#Can't get my tool to attach with bodyattach

32 messages · Page 1 of 1 (latest)

modest umbra
loud wind
# modest umbra

sorry somebody told me to make this so they would help me :')

modest umbra
#

@unkempt torrent whats 5 + 3 * 8?

unkempt torrent
cinder ridgeBOT
#
Program Output
29

modest umbra
#

wrong, 64 derp

unkempt torrent
#

what

modest umbra
#

#🧮︱math message this is why I asked you

unkempt torrent
#

I think its 43

modest umbra
#

I love when people start fighting over some jokes

modest umbra
#

OR MAYBEEE

#

5x8+3 = 40+3 = 43 OMG YOU BIG BRAIN

unkempt torrent
#

first int with last int

#

always

unkempt torrent
#

gaming

modest umbra
#
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 derp what do you think?

unkempt torrent
#

my chromosomes

#

got down

#

while reading it

modest umbra
#

nice

cinder ridgeBOT
#
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 ?