• 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 CreatureScripts error spam

GhostWD

I'm in love with the var_dump()
Joined
Jan 25, 2009
Messages
185
Solutions
6
Reaction score
29
@@EDIT
Have done little research and now i know that it's fault of script idle.lua which kicks after specified amount of time is any possible solution on this? maybe before kick removing of onThink statement in my script? idk ;/




Hello OTLanders i need your help ! I've scripts(3) which send magic effect each 1sec(?) everything is fine until there are some players online and few moments later(40min+-) client freezes players get kicked and in console i receive massive spam
Error:
Code:
[17/7/2017 8:37:56] [Error - CreatureScript Interface]
[17/7/2017 8:37:56] data/creaturescripts/scripts/ssjgodssj.lua:onThink
[17/7/2017 8:37:56] Description:
[17/7/2017 8:37:57] (internalGetPlayerInfo) Player not found when requesting player info #6
(...)
[17/7/2017 0:10:22] [Error - CreatureScript Interface]
[17/7/2017 0:10:22] data/creaturescripts/scripts/effect.lua:onThink
[17/7/2017 0:10:22] Description:
[17/7/2017 0:10:22] (internalGetPlayerInfo) Player not found when requesting player info #6
(...)
[17/7/2017 0:10:32] [Error - CreatureScript Interface]
[17/7/2017 0:10:32] data/creaturescripts/scripts/effereborn.lua:onThink
[17/7/2017 0:10:32] Description:
[17/7/2017 0:10:32] (internalGetPlayerInfo) Player not found when requesting player info #6
(...)

one of script
PHP:
local config =
{
storage = 31520,
timee = 1, -- po jakim czasie zostaje wyswietlony efekt
efekt1 = 106,
efekt2 = 85,
efekt3 = 109,
efekt4 = 107,
efekt5 = 87,
efekt6 = 93,
efekt7 = 84,
efekt8 = 89,
efekt9 = 100,
efekt10 = 105,
efekt11 = 98,
}
function onThink(cid, interval)
if getPlayerVocation(cid) == 4 and exhaustion.get(cid, config.storage) == false then
doSendMagicEffect(getPlayerPosition(cid),config.efekt1)
exhaustion.set(cid,config.storage,config.timee)

elseif getPlayerVocation(cid) == 5 and exhaustion.get(cid, config.storage) == false then
doSendMagicEffect(getPlayerPosition(cid),config.efekt2)
exhaustion.set(cid,config.storage,config.timee)

elseif getPlayerVocation(cid) == 7 and exhaustion.get(cid, config.storage) == false then
doSendMagicEffect(getPlayerPosition(cid),config.efekt2)
exhaustion.set(cid,config.storage,config.timee)

elseif getPlayerVocation(cid) == 12 and exhaustion.get(cid, config.storage) == false then
doSendMagicEffect(getPlayerPosition(cid),config.efekt2)
exhaustion.set(cid,config.storage,config.timee)

elseif getPlayerVocation(cid) == 13 and exhaustion.get(cid, config.storage) == false then
doSendMagicEffect(getPlayerPosition(cid),config.efekt1)
exhaustion.set(cid,config.storage,config.timee)

elseif getPlayerVocation(cid) == 14 and exhaustion.get(cid, config.storage) == false then
doSendMagicEffect(getPlayerPosition(cid),config.efekt2)
exhaustion.set(cid,config.storage,config.timee)

elseif getPlayerVocation(cid) == 17 and exhaustion.get(cid, config.storage) == false then
doSendMagicEffect(getPlayerPosition(cid),config.efekt3)
exhaustion.set(cid,config.storage,config.timee)

elseif getPlayerVocation(cid) == 18 and exhaustion.get(cid, config.storage) == false then
doSendMagicEffect(getPlayerPosition(cid),config.efekt4)
exhaustion.set(cid,config.storage,config.timee)

elseif getPlayerVocation(cid) == 24 and exhaustion.get(cid, config.storage) == false then
doSendMagicEffect(getPlayerPosition(cid),config.efekt5)
exhaustion.set(cid,config.storage,config.timee)

elseif getPlayerVocation(cid) == 28 and exhaustion.get(cid, config.storage) == false then
doSendMagicEffect(getPlayerPosition(cid),config.efekt1)
exhaustion.set(cid,config.storage,config.timee)

elseif getPlayerVocation(cid) == 36 and exhaustion.get(cid, config.storage) == false then
doSendMagicEffect(getPlayerPosition(cid),config.efekt2)
exhaustion.set(cid,config.storage,config.timee)

elseif getPlayerVocation(cid) == 61 and exhaustion.get(cid, config.storage) == false then
doSendMagicEffect(getPlayerPosition(cid),config.efekt2)
exhaustion.set(cid,config.storage,config.timee)

elseif getPlayerVocation(cid) == 77 and exhaustion.get(cid, config.storage) == false then
doSendMagicEffect(getPlayerPosition(cid),config.efekt1)
exhaustion.set(cid,config.storage,config.timee)

elseif getPlayerVocation(cid) == 78 and exhaustion.get(cid, config.storage) == false then
doSendMagicEffect(getPlayerPosition(cid),config.efekt2)
exhaustion.set(cid,config.storage,config.timee)

elseif getPlayerVocation(cid) == 84 and exhaustion.get(cid, config.storage) == false then
doSendMagicEffect(getPlayerPosition(cid),config.efekt1)
exhaustion.set(cid,config.storage,config.timee)

elseif getPlayerVocation(cid) == 85 and exhaustion.get(cid, config.storage) == false then
doSendMagicEffect(getPlayerPosition(cid),config.efekt2)
exhaustion.set(cid,config.storage,config.timee)

elseif getPlayerVocation(cid) == 98 and exhaustion.get(cid, config.storage) == false then
doSendMagicEffect(getPlayerPosition(cid),config.efekt7)
exhaustion.set(cid,config.storage,config.timee)

elseif getPlayerVocation(cid) == 99 and exhaustion.get(cid, config.storage) == false then
doSendMagicEffect(getPlayerPosition(cid),config.efekt5)
exhaustion.set(cid,config.storage,config.timee)

elseif getPlayerVocation(cid) == 100 and exhaustion.get(cid, config.storage) == false then
doSendMagicEffect(getPlayerPosition(cid),config.efekt7)
exhaustion.set(cid,config.storage,config.timee)

elseif getPlayerVocation(cid) == 101 and exhaustion.get(cid, config.storage) == false then
doSendMagicEffect(getPlayerPosition(cid),config.efekt7)
exhaustion.set(cid,config.storage,config.timee)

elseif getPlayerVocation(cid) == 107 and exhaustion.get(cid, config.storage) == false then
doSendMagicEffect(getPlayerPosition(cid),config.efekt2)
exhaustion.set(cid,config.storage,config.timee)

elseif getPlayerVocation(cid) == 117 and exhaustion.get(cid, config.storage) == false then
doSendMagicEffect(getPlayerPosition(cid),config.efekt5)
exhaustion.set(cid,config.storage,config.timee)

elseif getPlayerVocation(cid) == 130 and exhaustion.get(cid, config.storage) == false then
doSendMagicEffect(getPlayerPosition(cid),config.efekt4)
exhaustion.set(cid,config.storage,config.timee)

elseif getPlayerVocation(cid) == 131 and exhaustion.get(cid, config.storage) == false then
doSendMagicEffect(getPlayerPosition(cid),config.efekt4)
exhaustion.set(cid,config.storage,config.timee)

elseif getPlayerVocation(cid) == 142 and exhaustion.get(cid, config.storage) == false then
doSendMagicEffect(getPlayerPosition(cid),config.efekt2)
exhaustion.set(cid,config.storage,config.timee)

elseif getPlayerVocation(cid) == 147 and exhaustion.get(cid, config.storage) == false then
doSendMagicEffect(getPlayerPosition(cid),config.efekt1)
exhaustion.set(cid,config.storage,config.timee)

elseif getPlayerVocation(cid) == 151 and exhaustion.get(cid, config.storage) == false then
doSendMagicEffect(getPlayerPosition(cid),config.efekt2)
exhaustion.set(cid,config.storage,config.timee)

elseif getPlayerVocation(cid) == 152 and exhaustion.get(cid, config.storage) == false then
doSendMagicEffect(getPlayerPosition(cid),config.efekt2)
exhaustion.set(cid,config.storage,config.timee)

elseif getPlayerVocation(cid) == 157 and exhaustion.get(cid, config.storage) == false then
doSendMagicEffect(getPlayerPosition(cid),config.efekt5)
exhaustion.set(cid,config.storage,config.timee)

elseif getPlayerVocation(cid) == 162 and exhaustion.get(cid, config.storage) == false then
doSendMagicEffect(getPlayerPosition(cid),config.efekt8)
exhaustion.set(cid,config.storage,config.timee)

elseif getPlayerVocation(cid) == 165 and exhaustion.get(cid, config.storage) == false then
doSendMagicEffect(getPlayerPosition(cid),config.efekt1)
exhaustion.set(cid,config.storage,config.timee)

elseif getPlayerVocation(cid) == 167 and exhaustion.get(cid, config.storage) == false then
doSendMagicEffect(getPlayerPosition(cid),config.efekt2)
exhaustion.set(cid,config.storage,config.timee)

elseif getPlayerVocation(cid) == 172 and exhaustion.get(cid, config.storage) == false then
doSendMagicEffect(getPlayerPosition(cid),config.efekt7)
exhaustion.set(cid,config.storage,config.timee)

elseif getPlayerVocation(cid) == 181 and exhaustion.get(cid, config.storage) == false then
doSendMagicEffect(getPlayerPosition(cid),config.efekt1)
exhaustion.set(cid,config.storage,config.timee)

elseif getPlayerVocation(cid) == 182 and exhaustion.get(cid, config.storage) == false then
doSendMagicEffect(getPlayerPosition(cid),config.efekt2)
exhaustion.set(cid,config.storage,config.timee)

elseif getPlayerVocation(cid) == 187 and exhaustion.get(cid, config.storage) == false then
doSendMagicEffect(getPlayerPosition(cid),config.efekt2)
exhaustion.set(cid,config.storage,config.timee)

elseif getPlayerVocation(cid) == 196 and exhaustion.get(cid, config.storage) == false then
doSendMagicEffect(getPlayerPosition(cid),config.efekt1)
exhaustion.set(cid,config.storage,config.timee)

elseif getPlayerVocation(cid) == 197 and exhaustion.get(cid, config.storage) == false then
doSendMagicEffect(getPlayerPosition(cid),config.efekt9)
exhaustion.set(cid,config.storage,config.timee)

elseif getPlayerVocation(cid) == 201 and exhaustion.get(cid, config.storage) == false then
doSendMagicEffect(getPlayerPosition(cid),config.efekt1)
exhaustion.set(cid,config.storage,config.timee)
elseif getPlayerVocation(cid) == 202 and exhaustion.get(cid, config.storage) == false then
doSendMagicEffect(getPlayerPosition(cid),config.efekt8)
exhaustion.set(cid,config.storage,config.timee)

elseif getPlayerVocation(cid) == 207 and exhaustion.get(cid, config.storage) == false then
doSendMagicEffect(getPlayerPosition(cid),config.efekt10)
exhaustion.set(cid,config.storage,config.timee)
---------Rb------
elseif getPlayerVocation(cid) == 36 and exhaustion.get(cid, config.storage) == false then
doSendMagicEffect(getPlayerPosition(cid),config.efekt2)
exhaustion.set(cid,config.storage,config.timee)
elseif getPlayerVocation(cid) == 37 and exhaustion.get(cid, config.storage) == false then
doSendMagicEffect(getPlayerPosition(cid),config.efekt2)
exhaustion.set(cid,config.storage,config.timee)
elseif getPlayerVocation(cid) == 61 and exhaustion.get(cid, config.storage) == false then
doSendMagicEffect(getPlayerPosition(cid),config.efekt1)
exhaustion.set(cid,config.storage,config.timee)
elseif getPlayerVocation(cid) == 65 and exhaustion.get(cid, config.storage) == false then
doSendMagicEffect(getPlayerPosition(cid),config.efekt5)
exhaustion.set(cid,config.storage,config.timee)
elseif getPlayerVocation(cid) == 84 and exhaustion.get(cid, config.storage) == false then
doSendMagicEffect(getPlayerPosition(cid),config.efekt1)
exhaustion.set(cid,config.storage,config.timee)
elseif getPlayerVocation(cid) == 99 and exhaustion.get(cid, config.storage) == false then
doSendMagicEffect(getPlayerPosition(cid),config.efekt1)
exhaustion.set(cid,config.storage,config.timee)
elseif getPlayerVocation(cid) == 101 and exhaustion.get(cid, config.storage) == false then
doSendMagicEffect(getPlayerPosition(cid),config.efekt3)
exhaustion.set(cid,config.storage,config.timee)
elseif getPlayerVocation(cid) == 110 and exhaustion.get(cid, config.storage) == false then
doSendMagicEffect(getPlayerPosition(cid),config.efekt1)
exhaustion.set(cid,config.storage,config.timee)
elseif getPlayerVocation(cid) == 137 and exhaustion.get(cid, config.storage) == false then
doSendMagicEffect(getPlayerPosition(cid),config.efekt2)
exhaustion.set(cid,config.storage,config.timee)
elseif getPlayerVocation(cid) == 66 and exhaustion.get(cid, config.storage) == false then
doSendMagicEffect(getPlayerPosition(cid),config.efekt1)
exhaustion.set(cid,config.storage,config.timee)
elseif getPlayerVocation(cid) == 67 and exhaustion.get(cid, config.storage) == false then
doSendMagicEffect(getPlayerPosition(cid),config.efekt1)
exhaustion.set(cid,config.storage,config.timee)
elseif getPlayerVocation(cid) == 141 and exhaustion.get(cid, config.storage) == false then
doSendMagicEffect(getPlayerPosition(cid),config.efekt1)
exhaustion.set(cid,config.storage,config.timee)
elseif getPlayerVocation(cid) == 143 and exhaustion.get(cid, config.storage) == false then
doSendMagicEffect(getPlayerPosition(cid),config.efekt1)
exhaustion.set(cid,config.storage,config.timee)
elseif getPlayerVocation(cid) == 160 and exhaustion.get(cid, config.storage) == false then
doSendMagicEffect(getPlayerPosition(cid),config.efekt1)
exhaustion.set(cid,config.storage,config.timee)
elseif getPlayerVocation(cid) == 164 and exhaustion.get(cid, config.storage) == false then
doSendMagicEffect(getPlayerPosition(cid),config.efekt1)
exhaustion.set(cid,config.storage,config.timee)
elseif getPlayerVocation(cid) == 176 and exhaustion.get(cid, config.storage) == false then
doSendMagicEffect(getPlayerPosition(cid),config.efekt4)
exhaustion.set(cid,config.storage,config.timee)


elseif getPlayerVocation(cid) == 191 and exhaustion.get(cid, config.storage) == false then
doSendMagicEffect(getPlayerPosition(cid),config.efekt1)
exhaustion.set(cid,config.storage,config.timee)
elseif getPlayerVocation(cid) == 192 and exhaustion.get(cid, config.storage) == false then
doSendMagicEffect(getPlayerPosition(cid),config.efekt11)
exhaustion.set(cid,config.storage,config.timee)
end
return true
end
 
Last edited:
Solution
when i get kicked by script idle.lua script effect,effereborn,ssjgodssj loses focus on player which have been kicked and gives those errors from Upper post and kicks all players not only one solution?
SEVER: tfs 0.4.3777 8.6
Try this.
Idk why the script even runs when a player logs out though.
Code:
.
.
.
function onThink(cid, interval)
    if not isPlayer(cid) then
        return true
    end
.
.
.
when i get kicked by script idle.lua script effect,effereborn,ssjgodssj loses focus on player which have been kicked and gives those errors from Upper post and kicks all players not only one solution?
SEVER: tfs 0.4.3777 8.6
 
when i get kicked by script idle.lua script effect,effereborn,ssjgodssj loses focus on player which have been kicked and gives those errors from Upper post and kicks all players not only one solution?
SEVER: tfs 0.4.3777 8.6
Try this.
Idk why the script even runs when a player logs out though.
Code:
.
.
.
function onThink(cid, interval)
    if not isPlayer(cid) then
        return true
    end
.
.
.
 
Solution

Similar threads

Back
Top