Multiple inventories

Started by Pinback, Mon 16/11/2009 08:48:49

Previous topic - Next topic

Pinback

I'm trying to implent multiple inventories for the main character, by having multiple characters with different inventories to switch between, but when I use;

invMain.CharacterToUse = cTinman;

To change the active inventory to cTinman,  I get an error message - Undefined token 'invmain'
Could someone please tell me what I'm doing wrong?

Khris

I assume "invMain" is the script name of the Inventory Window?
Where did you put that line?

monkey0506

"undefined token" indicates that you're referencing something that doesn't exist. You said you're using "invMain" but then you said the error indicates the undefined token as "invmain". Note that AGS's script is case-sensitive, so be sure to check your capitalization as well as spelling. If that doesn't clear it up, as Khris said make sure that you have the script name of your InvWindow set in the editor, and if that's still not it, tell us where you're putting the script that it's causing errors. ;)

Khris

Also, there's that handy auto-complete window which should show up as soon as you have typed the first three letters of a known script object.
Typing "invma" <enter> should change the typed letters to the correct case.

SMF spam blocked by CleanTalk