slots_free
The slots_free function calculates the total number of free slots available in the player's bags. This function is useful for determining how much inventory space the player has left.
Parameters
This function does not take any parameters.
Returns
slotsfree(number): The total number of free slots available in the player's bags.
Example Usage in Lua
Here is an example of how to use the slots_free function in Lua:
local api = ...
-- Function to print the total number of free slots in the player's bags
function PrintSlotsFree()
local slotsfree = api.slots_free()
print("Total free slots in bags: " .. slotsfree)
end
-- Example usage: Print the total number of free slots in the player's bags
PrintSlotsFree()