I have a problem with the global sript once again.
When I go to pick up an object the game crashes and the error comes up as:
(Global script line 564)
Error: ObjectOff: invalid object specified
The line 564 of my GS is:
/**/ else if (button==LEFT) {
/**/ if (GetCursorMode()==9) ProcessClick(mouse.x,mouse.y,MODE_WALK);
/**/ if (GlobalCondition(2) || GlobalCondition(3) || GlobalCondition(4)) SetMode("default");
/**/ else{
/**/ UpdateActionBar();
/**/ SetLabelColor(ACTION,0,ActionLabelColorHighlighted);
/**/ StrCopy(GSusedmode,GSmode);
/**/ GSagsusedmode=GetCursorMode();
/**/ ProcessClick(mouse.x, mouse.y, GetCursorMode() );
/**/ SetMode("default");
/**/ }
/**/ }
What is wrong with the code?
The problem probably lies in the room/object interaction (that ProcessClick() would tell the engine to execute those interactions if any), check them and see if there's an attempt to turn of an inexistent object.