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

script error help tfs 1.2

gubbo123

New Member
Joined
Aug 15, 2017
Messages
151
Solutions
1
Reaction score
3
someone can help me?

i have this script
Lua:
local config = {
    number_max_ip = 1,
}

local white_list = {"000.000.000.000", "000.000.000.000"} 


function onLogin(player)
        if isInArray(white_list, Game.convertIpToString(player:getIp())) == false then
            if #getPlayersByIPAddress(player:getIp()) > config.number_max_ip then
               disconnect(player)
               end
         end
    return true
end

but i got this console error when i try use disconnect function

Lua Script Error: [CreatureScript Interface] data/creaturescripts/scripts/mc.lua:onLogin data/creaturescripts/scripts/mc.lua:11: attempt to call global 'disconnect' (a nil value)

how solve this?
 
It's telling you that the function disconnect does not exist.

Wherever you got that script probably has the function available there as well.
 
Back
Top