• 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!

TFS 1.X+ TFS 1.2 Problem with Lua

GugiAllSafe

New Member
Joined
Jan 14, 2019
Messages
32
Reaction score
4
Hello, today we decide to start work on new Tibia 10.98 server, and after few minutes of launching beta, we got first issues. Maybe you guys know whats going on?
Code:
Lua Script Error: [Event Interface]
data/events/scripts/player.lua:Player@onLook
data/events/scripts/player.lua:21: attempt to call method 'getType' (a nil value)
stack traceback:
        [C]: in function 'getType'
        data/events/scripts/player.lua:21: in function <data/events/scripts/player.lua:5>
 
Lua Script Error: [Action Interface]
data/actions/scripts/other/teleport.lua:onUse
data/actions/scripts/other/teleport.lua:3: attempt to call field 'contains' (a nil value)
stack traceback:
        [C]: in function 'contains'
        data/actions/scripts/other/teleport.lua:3: in function <data/actions/scripts/other/teleport.lua:2>
 
Lua Script Error: [Event Interface]
data/events/scripts/player.lua:Player@onLook
data/events/scripts/player.lua:21: attempt to call method 'getType' (a nil value)
stack traceback:
        [C]: in function 'getType'
        data/events/scripts/player.lua:21: in function <data/events/scripts/player.lua:5>
 
You're going to have to post the scripts, error messages aren't enough.

The contains error I'm assuming is because you're using some 1.3 script and table.contains was implemented after 1.2 was released, put this in compat.lua:
LUA:
function table.contains(t, value)
    for k, v in pairs(t) do
        if v == value then
            return true
        end
    end
    return false
end

But as for getType, I need the script.
 
Back
Top