My table can have a maximum of 4 numbers.
for example if the player's storage is 900 (it is greater than 880 and less than 1000), then it must enter the table between these values, like it:
newTable ={1000, 900, 880, 720}
and...
What`s the best way to reorgazine a table?
Lua:
local table = {1000, 880, 720, 600}
function onUse(player, item, fromPosition, target, toPosition, isHotkey)
if player:getStorageValue(1200) > Some Value in table then
table[X] = player:getStorageValue(1200)
end
return true
end
newTable ={1000, 900, 880, 720}
and...
What`s the best way to reorgazine a table?