Instructions/Check space for item

From Desynced Wiki


Check space for item
     
     Checks if free space is available for an item and amount
Lua ID checkfreespace
Category Math
Icon Count Free Space.png
Argument One: Type Exec
Argument One: Name Can't Fit
Argument One: Description Execution if it can't fit the item
Argument Two: Type Input
Argument Two: Name Item
Argument Two: Description Item and amount to check can fit
Argument Two: Data Type item_num



Description[edit | edit source]

Evaluates if a specified item could fit in the inventory.

Uses[edit | edit source]

Used to verify if any (0) or a specified amount of an item could fit in inventory.

If the inventory was 1 slot with 19 metal ore, it would be able to fit 0 or 1 units of metal ore, but any number greater specified, it would evaluate as "Can't Fit". If full, 0 also evaluates as "Can't Fit".

Similar Instructions[edit | edit source]

Have Item, Get space for item