New.room.v
From AGI Wiki
Revision as of 18:02, 12 April 2019 by Andrew Korson (talk | contribs) (Created page with "The '''new.room.v''' command indirectly changes the current room number and forces an update. == Syntax == new.room.v(var vROOMNUM); == Remarks == The '''new....")
The new.room.v command indirectly changes the current room number and forces an update.
Syntax
new.room.v(var vROOMNUM);
Remarks
The new.room.v command causes AGI to halt execution of the current script. The current room number is changed to value of vROOMNUM. The resources on the memory heap are dumped (with the exception of logic 0).
The only difference between new.room.v and new.room is that the value of the new room is passed indirectly. For details on how AGI manages changing the room, see the new.room Remarks section.
Possible Errors
If the logic matching vROOMNUM does not exist, AGI will raise a runtime error and crash.
Example
Code:
<syntaxhighlight lang="agi"> [ common debug feature to change the current room if (said("teleport"))
{ if(v40 > 0) { get.num("Room number: ", v40); new.room.v(v40); } }
</syntaxhighlight>
Technical Information
Required Interpreter Version: | Available in all AGI versions. |
Byte-Code Value: | 19 (0x13 hex) |