Get.v

From AGI Wiki
Jump to navigationJump to search
The printable version is no longer supported and may have rendering errors. Please update your browser bookmarks and please use the default browser print function instead.

The get.v command indirectly adds an inventory item to the player's inventory.

Syntax

get.v(var vA);

Remarks

The room number for item iB, where B is the value of vA, is set to 255.

The get.v command is basically a shortcut equivalent to the put.v command with a new room number value of 255.

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 = 201;
get.v(v50);  [ item 201's room number is now 255

[ equivalent code:
v51 = 255;
put.v(v50, v51);

Technical Information

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

See Also

Inventory Item Commands
get
put.v