Put.v

From AGI Wiki
Revision as of 22:25, 18 April 2019 by Andrew Korson (talk | contribs) (Created page with "The '''put.v''' command indirectly sets the room number value for an inventory item. == Syntax == put.v(var vITEM, var vR...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigationJump to search

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:

<syntaxhighlight lang="agi"> v220 = 25; v221 = 30; put.v(v220, v221); [ item i25's room number is now 30 </syntaxhighlight>

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