Hi! I have a funtion in my battle event (mod).
The thing is, when this function is used in a login or logout event I get a "Creture not found" Error.
The "recruitArea and "FightArea" arent wrong. This happens to ALL players, not just the players in the event. Everytime someone logout or login, I get this error "creature not found".
When I deleted this function in login and logout , the error stopped. But the event did not work as it should.
Thanks!
Code:
function clearTeamEventStorages(cid)
if isInRecruitArea(cid) or isInFightArea(cid) then
doTeleportThing(cid,getTownTemplePosition(getPlayerTown(cid)))
doSendMagicEffect(getThingPos(cid),10)
end
if isFightOn() then
if isJoiner(cid) then
if isBlue(cid) then
addRedKills()
elseif isRed(cid) then
addBlueKills()
end
doPlayerSendTextMessage(cid,MESSAGE_TYPES["orange"],"You have died in Team-Battle Event.")
end
end
removeFromjoiners(cid)
removeFromBlue(cid)
removeFromRed(cid)
doRemoveCondition(cid)
doRemoveCondition(cid, CONDITION_OUTFIT)
end
The thing is, when this function is used in a login or logout event I get a "Creture not found" Error.
The "recruitArea and "FightArea" arent wrong. This happens to ALL players, not just the players in the event. Everytime someone logout or login, I get this error "creature not found".
When I deleted this function in login and logout , the error stopped. But the event did not work as it should.
Thanks!
Last edited: