What is the outline of a piece of script that is used in events?

Okay, so I was working on a map, and I wanted to make a little area where the player can walk over to a pile of gold, use it to pick it up, and then have the pile of gold be replaced by another blank floor tile.

I got the tile swap script and all that, inserted it into the script editor. all of that. But I ended up getting a syntax error with the script call. Game_Interpreter 1411: invalid octal digit.

For the record, I don't think it was the script file.

What I want to know is, when you add in an event command and choose to plug in some script functions, do you immediately just put in the script call? Or is there a framework that needs to be put in first?

Sorry if this is the wrong place or way to ask, i'm having a hard time finding a good reference to go off of with this D:

I'm still trying to wrap my arms around Rubyscript as a whole.
Yes, you just write your script calls anywhere that supports scripts.

For your problem specifically, you are probably writing your numbers like

Code:
093
instead of just writing it normally like
Code:
93
Yes, you just write your script calls anywhere that supports scripts.

For your problem specifically, you are probably writing your numbers like

093instead of just writing it normally like
Code:
93
Damnit, i'm a dummy. Well, now i'm having a new problem. uninitialized constant A145. This may be a problem with the Tile Swap script instead, however.
However, you don't need a tileswap script for that - simply make the gold an event and switch the event off after taking it.

Edit

If you have problems with the script calls, please make a screenshot of the event making the script call and post that screenshot here
Damnit, i'm a dummy. Well, now i'm having a new problem. uninitialized constant A145. This may be a problem with the Tile Swap script instead, however.
You're missing the quotation marks

Code:
"A145"
However, you don't need a tileswap script for that - simply make the gold an event and switch the event off after taking it.

Edit

If you have problems with the script calls, please make a screenshot of the event making the script call and post that screenshot here
.......wat

Uh....care to explain that a little bit further?

Also, quotation marks did fix the crashes finally. Too bad it turns out the swap script was a bad idea Dx

Also, putting in an erase event did not remove the gold.
.......wat

Uh....care to explain that a little bit further?
Attached are the two pages of a simple event that can be copied to any map. It will give a message and 100 gold when the player first steps on that event and disappear after that.

Edit: erase event is ALWAYS only temporary - please follow the link in my signature for the tutorials to learn how to work with RM Ace, it appears that you're trying to work on the editor without checking the tutorials first, and Ace has enough little quirks to make that a bad idea

goldpile1.png

goldpile2.png
Attached are the two pages of a simple event that can be copied to any map. It will give a message and 100 gold when the player first steps on that event and disappear after that.

Edit: erase event is ALWAYS only temporary - please follow the link in my signature for the tutorials to learn how to work with RM Ace, it appears that you're trying to work on the editor without checking the tutorials first, and Ace has enough little quirks to make that a bad idea
This is nice. Well, actually, I have read the thread in your signature. And I see what I was doing wrong now. However, now when I start up a playtest, the event starts out gone. Maybe the switch is somehow starting out off.
Do you start a new game or do you load a savegame?

On a new game, all switches start OFF (unless a script manipulates them)

In a savegame, the switches are loaded to the status they had when saving the game.

If you used a general switch instead of a self-switch, then the third possibility is that another event or a script uses the same general switch and turns that ON before you get to the gold.

The general switches will not work in the case of a gold pile anyway, because by copying only self-switches remain independant - a general switch copied would slave all events to the same general switch (which might be required by other things, but would be bad for gold piles)
Do you start a new game or do you load a savegame?

On a new game, all switches start OFF (unless a script manipulates them)

In a savegame, the switches are loaded to the status they had when saving the game.

If you used a general switch instead of a self-switch, then the third possibility is that another event or a script uses the same general switch and turns that ON before you get to the gold.

The general switches will not work in the case of a gold pile anyway, because by copying only self-switches remain independant - a general switch copied would slave all events to the same general switch (which might be required by other things, but would be bad for gold piles)
It's all new games and stuff. nevermind, I figured it out on my own.
You probably had the first page with a condition, or the second page with no condition, so the correct page was not being made active.


Anyway, since you figured it out ...


This thread is being closed, due to being solved. If for some reason you would like this thread re-opened, please report this post and leave a message why. Thank you.

Original thread: https://forums.rpgmakerweb.com/threads/what-is-the-outline-of-a-piece-of-script-that-is-used-in-events.20555/