• There is NO official Otland's Discord server and NO official Otland's server list. The Otland's Staff does not manage any Discord server or server list. Moderators or administrator of any Discord server or server lists have NO connection to the Otland's Staff. Do not get scammed!

LUA ERROR FOR GOD COMMAND /i HELP PLEASE

PyrooSorc

New Member
Joined
Apr 21, 2021
Messages
14
Reaction score
1
Lua Script Error: [TalkAction Interface] data/talkactions/scripts/create_item.lua:eek:nSay data/talkactions/scripts/create_item.lua:14: attempt to call method 'splitTrimmed' (a nil value) stack traceback: [C]: in function 'splitTrimmed' data/talkactions/scripts/create_item.lua:14: in function <data/talkactions/scripts/create_item.lua:5>

the /i command not working is the issue ... help?
 
Solution
The script posted is not the one you use, you need the string.splitTrimmed function.
Just post it somewhere in global.lua:
Lua:
string.splitTrimmed = function(str, sep)
    local res = {}
    for v in str:gmatch("([^" .. sep .. "]+)") do
        res[#res + 1] = v:trim()
    end
    return res
end
The script posted is not the one you use, you need the string.splitTrimmed function.
Just post it somewhere in global.lua:
Lua:
string.splitTrimmed = function(str, sep)
    local res = {}
    for v in str:gmatch("([^" .. sep .. "]+)") do
        res[#res + 1] = v:trim()
    end
    return res
end
 
Solution
Back
Top