przemek1991
New Member
- Joined
- Feb 17, 2008
- Messages
- 25
- Reaction score
- 0
Hi, I get this problem when first player login on server
after first player logs in, the rest of players login normal and the error don't show any more, only on first login after server restart.
login.lua >
I don't know how to do it, I searched in all forums and i didn't find it, so plase help me
Code:
[13/06/2009 21:10:22] Lua Script Error: [CreatureScript Interface]
[13/06/2009 21:10:22] data/creaturescripts/scripts/login.lua:onLogin
[13/06/2009 21:10:22] luaAddEvent(). Callback parameter should be a function.
after first player logs in, the rest of players login normal and the error don't show any more, only on first login after server restart.
login.lua >
Code:
function onLogin(cid)
registerCreatureEvent(cid, "inquisitionPortals")
registerCreatureEvent(cid, "PlayerKill")
registerCreatureEvent(cid, "PlayerDeath")
if (InitArenaScript ~= 0) then
InitArenaScript = 1
-- make arena rooms free
for i = 42300, 42309 do
setGlobalStorageValue(i, 0)
setGlobalStorageValue(i+100, 0)
end
end
-- if he did not make full arena 1 he must start from zero
if getPlayerStorageValue(cid, 42309) < 1 then
for i = 42300, 42309 do
setPlayerStorageValue(cid, i, 0)
end
end
-- if he did not make full arena 2 he must start from zero
if getPlayerStorageValue(cid, 42319) < 1 then
for i = 42310, 42319 do
setPlayerStorageValue(cid, i, 0)
end
end
-- if he did not make full arena 3 he must start from zero
if getPlayerStorageValue(cid, 42329) < 1 then
for i = 42320, 42329 do
setPlayerStorageValue(cid, i, 0)
end
end
if getPlayerStorageValue(cid, 42355) == -1 then
setPlayerStorageValue(cid, 42355, 0) -- did not arena level
end
setPlayerStorageValue(cid, 42350, 0) -- time to kick 0
setPlayerStorageValue(cid, 42352, 0) -- is not in arena
setPlayerStorageValue(cid,29061,1)
if(InitHistory == 0) then
local historyPage = addEvent(historyPage, 60000, {})
InitHistory = historyPage
end
return TRUE
end
return true