• 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!
  • 2026 staff recruitment is open! Check it out and consider applying!

[TFS 1.0] Metamethods problems

Zyntax

*WannaBe Scripter*
Joined
Jan 27, 2010
Messages
533
Reaction score
40
Location
Lua & XML Section
I recently downloaded and installed the "new" TFS1.0 (10.31) files, set everything up as usual, created my Chars and logged in.

As I tried some things out, scripted some shit, I noticed that the meta functions are kinda screwed up.

e.g.
I tried to /addskill *char name*,l,10
At first it worked, the char got 10 levels, the same goes for skills, everything perfect.
I created some stuff like /i *itemID*,*count* and it also worked perfectly.

Today I started off as usual, starting up the server, logging in.
I changed NOTHING at all compared to yesterday.

I tried to /i again
aaaand then this
2ppzcl3.jpg


It's telling me that this line
Code:
local split = param:split(",") <- is screwed
but the param:split(",") command seems legit and correct to me, it worked some hours ago...

I can't seem to find the cause of this problem and that's why I hope that SOMEBODY out there could give a helping hand, it's frustrating to search for hours and get no result at all.
 
Add this into your global.lua
Code:
string.split = function(str, sep)
    local res = {}
    for v in str:gmatch("([^" .. sep .. "]+)") do
        res[#res + 1] = v
    end
    return res
end
 
Add this into your global.lua
Code:
string.split = function(str, sep)
    local res = {}
    for v in str:gmatch("([^" .. sep .. "]+)") do
        res[#res + 1] = v
    end
    return res
end

Thanks Printer, working like a charm!
I still can't figure out why it worked before and stopped all of a sudden...
 
Back
Top