Failure to recognize the object

Started by Mole person, Mon 14/01/2008 12:08:20

Previous topic - Next topic

Mole person

At the room script editor I wrote:

// room script file
oConger.SetView(11);
oConger.Animate(1);


It reports:

There was an error compiling your script. The problem was:
In: 'Room 1 script'

Error (line 2): Parse error: unexpected 'oConger'

I did everything following the manual. I do have object CONGER whose script name is oConger.
I am sorry if this question is not appropriate for this forum, I read the help file regarding objects several times and attempted all I could remember.

Khris

The room script is basically a collection of functions that are executed at the appropriate time. You can't put commands like that directly into the script, they have to go inside one of those functions.
Then only thing allowed outside are variable declarations ("int hp = 300;").

When do you want the object to animate? After the player has entered the room?
If so, in Room Editor -> Settings, click the red i button, double click the event and choose "RunScript" from the dropdown menu.
Now you can either click the edit script button (which will show only the contents of the created function) or go back to editing whole room script, then put the two lines inside said function.

Mole person

Thank you very much I am sorry for asking such a stupid question...

But I have another one, "Can I animate objects without their animation causing the character to enter the wait mode?"

Khris

Look up Object.Animate in the manual and read the paragraph about eBlock / eNoBlock :)

SMF spam blocked by CleanTalk