Lua Script Error: [CreatureScript Interface]
data/creaturescripts/scripts/arenakill.lua:onKill
data/creaturescripts/scripts/arenakill.lua:4: attempt to compare number with boolean
stack traceback:
data/creaturescripts/scripts/arenakill.lua:4: in function <data/creaturescripts/scripts/arenakill.lua:1>
if room > 0 then
end
for every killed monster. What could be the problem? I've checked the scripts hundrets of time and everything seems to be ok, when I remove the arena scripts from creaturescripts the monsters are ok so it's definitely problem with arenas scripts.You may enter the next arena pit!
function onKill(cid, target, lastHit)
local monster = getCreatureName(target)
local room = getArenaMonsterIdByName(monster)
if room > 0 then
setPlayerStorageValue(cid, room, 1)
doPlayerSendTextMessage(cid,MESSAGE_EVENT_DEFAULT,'You may enter the next arena pit!')
end
return TRUE
end
function onKill(cid, target)
local room = getArenaMonsterIdByName(getCreatureName(target))
if room > 0 then
setPlayerStorageValue(cid, room, 1)
doPlayerSendTextMessage(cid,MESSAGE_EVENT_DEFAULT,'You can enter next room!')
end
return TRUE
end
@Up,
Yes that looks correct, and sup klek?
I was on your server for awhile, if you remember.
@kleksu
Lua:function onKill(cid, target) local room = getArenaMonsterIdByName(getCreatureName(target)) if room > 0 then setPlayerStorageValue(cid, room, 1) doPlayerSendTextMessage(cid,MESSAGE_EVENT_DEFAULT,'You can enter next room!') end return TRUE end
Then you don't have function getArenaMonsterIdByName lol ;p
do you have /lib/arena.lua?
if (InitArenaScript ~= 0) then
InitArenaScript = 1
-- make arena rooms free
for i = 42300, 42309 do
setGlobalStorageValue(i, 0)
setGlobalStorageValue(i+100, 0)
end
end
I killed the monster's last room, the following message appears
"First kill monster!"
Please how to fix?
same problem..!
edit :
arenaKickPosition = {x=554, y=1156, z=7} -- position where kick from arena when you leave/you did arena level
shall this POS be in reward room or outside there the NPC are?!
doTeleportThing(cid, arenaKickPosition, TRUE)
local yourPositions = {x=,y=,z=} -- reward room
doTeleportThing(cid, yourPositions, TRUE)
Go to ./movements/scripts/didarenalevel.lua and change:
To:Code:doTeleportThing(cid, arenaKickPosition, TRUE)
Code:local yourPositions = {x=,y=,z=} -- reward room doTeleportThing(cid, yourPositions, TRUE)