Get.v

From AGI Wiki
Jump to navigationJump to search

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:

<syntaxhighlight lang="agi"> v50 = 201; get.v(v50); [ item 201's room number is now 255

[ equivalent code: v51 = 255; put.v(v50, v51); </syntaxhighlight>

Technical Information

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

See Also

Inventory Item Commands
get
put.v