Difference between revisions of "Get.room.v"

From AGI Wiki
Jump to navigationJump to search
(Created page with "The '''get.room.v''' command copies an inventory item's room number to a variable. == Syntax == get.room.v(var vA, va...")
 
 
Line 7: Line 7:
 
== Remarks ==
 
== Remarks ==
  
Variable '''vB''' is set to the [[OBJECT File (AGI)|room number]] of item [[inventory item]] iC, where C = vA.
+
Variable '''vB''' is set to the [[OBJECT File (AGI)|room number]] of item [[inventory item]] '''iC''', where '''C''' = '''vA'''.
  
 
Note that there is not an equivalent 'number' version of the '''get.room.v''' command (i.e. no '''get.room''' that takes a number as an argument.)
 
Note that there is not an equivalent 'number' version of the '''get.room.v''' command (i.e. no '''get.room''' that takes a number as an argument.)

Latest revision as of 15:12, 7 April 2019

The get.room.v command copies an inventory item's room number to a variable.

Syntax

get.room.v(var vA, var vB);

Remarks

Variable vB is set to the room number of item inventory item iC, where C = vA.

Note that there is not an equivalent 'number' version of the get.room.v command (i.e. no get.room that takes a number as an argument.)

Possible Errors

If the inventory item is not valid (the number exceeds the total number of inventory items in the OBJECT file), AGI will raise trappable error #23.

Example

Code:
v50 = 21;
get.room.v(v50, v51);   [ v51 now equals room number for item 21

Technical Information

Required Interpreter Version: Available in all AGI versions.
Byte-Code Value: 97 (0x61 hex)

See Also

Inventory Item Commands