Instructions/Check space for item

From Desynced Wiki
Revision as of 05:20, 17 September 2023 by Johan (talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)


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

Evaluates if a specified item could fit in the inventory.

Uses

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

Have Item, Get space for item