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

TalkAction /ban with nick, time and comment (tfs 0.3.4+)

@maniekzmx:
You haven't function doAddBanishment, outdated distro or script.
 
I have error:
[27/11/2009 17:04:52] Lua Script Error: [TalkAction Interface]
[27/11/2009 17:04:52] data/talkactions/scripts/ban.lua:eek:nSay

[27/11/2009 17:04:52] data/talkactions/scripts/ban.lua:17: attempt to call global 'doAddBanishment' (a nil value)
[27/11/2009 17:04:52] stack traceback:
[27/11/2009 17:04:52] data/talkactions/scripts/ban.lua:17: in function <data/talkactions/scripts/ban.lua:4>

[27/11/2009 17:04:55] Lua Script Error: [TalkAction Interface]
[27/11/2009 17:04:55] data/talkactions/scripts/ban.lua:eek:nSay

[27/11/2009 17:04:55] data/talkactions/scripts/ban.lua:17: attempt to call global 'doAddBanishment' (a nil value)
[27/11/2009 17:04:55] stack traceback:
[27/11/2009 17:04:55] data/talkactions/scripts/ban.lua:17: in function <data/talkactions/scripts/ban.lua:4>

[27/11/2009 17:04:56] Lua Script Error: [TalkAction Interface]
[27/11/2009 17:04:56] data/talkactions/scripts/ban.lua:eek:nSay

[27/11/2009 17:04:56] data/talkactions/scripts/ban.lua:17: attempt to call global 'doAddBanishment' (a nil value)
[27/11/2009 17:04:56] stack traceback:
[27/11/2009 17:04:56] data/talkactions/scripts/ban.lua:17: in function <data/talkactions/scripts/ban.lua:4>

And my ban system don't work :(
 
@maniekzmx:
You haven't function doAddBanishment, outdated distro or script.

in 0.3.5pl1 is this function.

in doc:
doAddBanishment(accId[, length[, reason[, action[, comment[, admin]]]]])

but i get this same problem
 
I have the same problem. I used TFS 0.3.6. Error - data/talkactions/scripts/ban.lua:17: attempt to call global 'doAddBanishment' (a nil value). Where i must add 'doAddBanishment'? To engine?
 
Error

Code:
[Error - TalkAction Interface] 
data/talkactions/scripts/ban.lua:onSay
Description: 
data/talkactions/scripts/ban.lua:17: attempt to call global 'doAddBanishment' (a nil value)
stack traceback:
data/talkactions/scripts/ban.lua:17: in function <data/talkactions/scripts/ban.lua:4>

Help, please! :D
 
same problem, also my ban system stopped working, anyone have a ban system working??
not jail, ban
 
i don't know why are these guys using this ^^ when we have it using right-clicking on a char hahah
 
edit edition by beon:


0.3.6+
Code:
local default_comment = ""
local default_lenght = 1 -- ban time in hours

function onSay(cid, words, param)
    local parametres = string.explode(param, ",")
    if(parametres[1] ~= nil) then
        local accId = getAccountIdByName(parametres[1])
        if(accId > 0) then
            local lenght = default_lenght
            local comment = default_comment
            if(parametres[2] ~= nil and tonumber(parametres[2]) > 0) then
                lenght = tonumber(parametres[2])
            end
            if(parametres[3] ~= nil) then
                comment = parametres[3]
            end
            local player = getPlayerByNameWildcard(parametres[1])
            if(isPlayer(player) == TRUE) then
                doRemoveCreature(player)
            end
        else
            doPlayerSendCancel(cid, "Player with name " .. parametres[1] .. " doesn't exist.")
        end
    else
        doPlayerSendCancel(cid, "You must enter name.")
    end
    return true
end
 
Last edited:
Back
Top