Problem - BUG?

Started by Rocco, Sun 25/04/2004 16:31:45

Previous topic - Next topic

Rocco

I have some action, where i wanted the player only to watch for this reason.
Initally this action start with an inventory is used on a hotspot.
then the action is running, and i place this code after:

DisableCursorMode(0);
DisableCursorMode(1);
DisableCursorMode(2);
DisableCursorMode(3);
SetMouseCursor(6);

Now i have the the pointer, but if im klicking on a hotspot i get the inventory item i used before and the playercharacter reacts on this, which is not good.
so im inserting:

SetActiveInventory(-1);

but then the game chrashes and i get this error-message if i klick on a hotspot with the pointer.

(ACI version 2.61.730)

(Global script line 321)
Error: GetInvName: invalid inventory item specified


Ashen

SetMouseCursor(); only changes the cursor graphic, not the mode.

DisableCursorMode(0);
DisableCursorMode(1);
DisableCursorMode(2);
DisableCursorMode(3);
SetCursorMode(6);

should do the trick. If not, what does it actually say on line 321, as that's causing the crash.

Do0kie

Actually, I get this error all the time and it's slowly but surely freaking me out. However I noticed this error is a bit random. It can happen now, and the next time I try the exact same thing I get no error. :o
Guess I'll have to check the script line next time the error shows up.

Pumaman

If you do SetActiveInventory(-1), and then you later try to get the current inventory name with GetInvName, this error will happen since there is no inventory item.

Post the your script around line 321 and we can probably tell you how to fix it.

Akumayo

I have noticed some random errors as well (though not this one) like sometimes, while adding script to a function, when I save, I get a nested functions not supported error, but if I delete the function, and rewrite the same script, it works!

That was all one sentence!
"Power is not a means - it is an end."

Pumaman

That usually happens if you forget a closing brace }  in your function.

SMF spam blocked by CleanTalk