#Can't get my tool to attach with bodyattach
32 messages · Page 1 of 1 (latest)
sorry somebody told me to make this so they would help me :')
@unkempt torrent whats 5 + 3 * 8?
;compile
print(5 + 3 * 8)
Program Output
29
trustsense#0000 | lua | lua-5.4.3 | wandbox.org
wrong, 64 
what
#🧮︱math message this is why I asked you
I love when people start fighting over some jokes
5+3x8 = 8x8 =64 🤓
OR MAYBEEE
5x8+3 = 40+3 = 43 OMG YOU BIG BRAIN
8x5 + 3 = 40+3 = 43
first int with last int
always
nitro without nitro
gaming
function Format_ST(xstr)
local xtab = {}
local split1 = string.split(xstr, "/")
table.remove(split1, #split1)
for i,v in pairs(split1) do
local split_reset = string.split(v, ">")
local resetIndex = split_reset[1]
local split_CurrencyIndex = string.split(split_reset[2], "-")
local currencyIndex = split_CurrencyIndex[1]
local split_CurrrencyName = string.split(split_CurrencyIndex[2], ":")
local currencyName = split_CurrrencyName[1]
local split_CurrencyValue = string.split(split_CurrrencyName[2], ";")
local currencyValue = split_CurrencyValue[1]
xtab[resetIndex] = {["CurrencyIndex"] = currencyIndex, ["CurrencyName"] = currencyName, ["CurrencyValue"] = currencyValue, ["Upgrades"] = {}}
for x,c in pairs(string.split(split_CurrencyValue[2], "%")) do
table.insert(xtab[resetIndex]["Upgrades"], c)
end
end
return xtab
end
function Format_TS(xtab)
local xstr = nil
for i, v in pairs(xtab) do
local temp_xstr = i..">"..v["CurrencyIndex"].."-"..v["CurrencyName"]..":"..v["CurrencyValue"]
for x, c in pairs(v["Upgrades"]) do
if x == 1 then
temp_xstr = temp_xstr..";"..c
else
temp_xstr = temp_xstr.."%"..c
end
end
if xstr == nil then
xstr = temp_xstr
else
xstr = xstr.."/"..temp_xstr
end
end
return xstr.."/"
end
local testString = "1>1-Iron:0;15%25%64/2>2-Gold:15;64%75%364%355%643/"
local tab = Format_ST(testString)
print("TABLE: ", tab)
local str = Format_TS(tab)
print(str)
if str == testString then
print("DONE")
end
--[[ format
"RESET>INDEX-CURRENCY_NAME:CURRENCY_VALUE;UPGRADES.upg1.upg2.upg3.ugp4/"
]]
Big brain string data system
what do you think?
nice
;compile
Program Output
/opt/wandbox/lua-5.4.3/bin/lua: prog.lua:3: field 'split' is not callable (a nil value)
stack traceback:
prog.lua:3: in function 'Format_ST'
prog.lua:51: in main chunk
[C]: in ?
avgcrazyblue#0000 | lua | lua-5.4.3 | wandbox.org
