scripting problem ('undefined token' error).

Started by niallak, Mon 26/02/2007 18:47:01

Previous topic - Next topic

niallak

ags was working fine for ages but then i went to save it and a pop-up came up and said there was a mistake on line 78 of the scripting and i don't know whats wrong ???
Quote
---------------------------
Compile Error
---------------------------
There was an error compiling your script. The problem was:
In: 'Global script'
Error (line 78): Undefined token 'invCustomInv'

Heres the line:    invCustomInv.ScrollUp();
Could someone plese tell me whats wrong with it.

Ashen

#1
What was the exact text of the error message? (You should be able to copy it with Ctrl-C.)

With out knowing that it's hard to say what the problem is. Have you definitley got an InvWindow object called invCustomInv? The most likely problem is that it's refering to a GUI Object you've deleted or renamed - but again without the exact error message I couldn't really say.

EDIT:
Thank you.
OK, that's what I was talking about - it's refering to something (invCustomInv) that doesn't exist. That's the default name of the Inventory Window object on the Inventory GUI - have you deleted or renamed it?
I know what you're thinking ... Don't think that.

niallak

#2
i did do something.
theres a box with 'text window' written beside it and i ticked it the display picture underneath changed, i didn't know what had happened so i left it.
when i untick the box nothing happens

i can just start a new game and use the same room, i have the rooms saved already so its not that bad

Ashen

Ah, yes, that'd do it. When you checked that box, you should've got a confirmation window warning you that it'll destory the GUI - it deletes all the controls that re aon the GUI (in this case, including invCustomInv) and replaces them with the 8 buttons a Text Window GUI uses. Unchecking it unfortunately won't reset the GUI, you need to remake it yourself. You can copy the layout from any other game, the Control functions are still there - which is why you got this error - you just need to name the controls properly. Or, if you didn't have much in the Global script yet, your way works, too.

I know what you're thinking ... Don't think that.

SMF spam blocked by CleanTalk