Put.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 put.v command indirectly sets the room number value for an inventory item.

Syntax

put.v(var vITEM, var vROOMNUM);

Remarks

The room number for inventory item iA, where A = vITEM, is changed to B, where B = vROOMNUM. If the new room number is 255, it signifies the item being in the player's 'inventory'; you could use the get.v command instead.

Changing an inventory item's room number does not actually 'move' the item.

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:
v220 = 25;
v221 = 30;
put.v(v220, v221);  [  item i25's room number is now 30

Technical Information

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

See Also

Inventory Item Commands
put
get
get.v