Postado Fevereiro 19, 2017 8 anos Alguem da uma força também ultimamente esses erros andam começando do nada o evento ocorre ai quando fecha da isso ERROR Spoiler [Error - CreatureScript Interface] data/creaturescripts/scripts/events/realTeamBattle.lua:onCombat Description: ...ta/creaturescripts/scripts/events/realTeamBattle.lua:11: attempt to compare number with string stack traceback: ...ta/creaturescripts/scripts/events/realTeamBattle.lua:11: in function <...ta/creaturescripts/scripts/events/realTeamBattle.lua:8> TEAMBATTLE Spoiler --[[ Real Team Battle Event Desenvolvido por Vítor Bertolucci (Killua) ]] function onCombat(cid, target) if isPlayer(cid) and isPlayer(target) then local sto = getPlayerStorageValue(cid, realTeamBattle.teamStorage) if sto > 0 then if sto == getPlayerStorageValue(target, realTeamBattle.teamStorage) then return false end end end return true end function onTarget(cid, target) if isPlayer(cid) and isPlayer(target) then local sto = getPlayerStorageValue(cid, realTeamBattle.teamStorage) if sto > 0 then if sto == getPlayerStorageValue(target, realTeamBattle.teamStorage) then doPlayerSendCancel(cid,"Você não pode atacar seu companheiro de time.") return false end end end return true end function onPrepareDeath(cid, deathList) if isPlayer(cid) then local sto = getPlayerStorageValue(cid,realTeamBattle.teamStorage) if sto > 0 then local times = {"Red Assassins", "Blue Norsemen", "Black Hunters", "Green Beggars"} realTeamBattle.broadcast(MESSAGE_STATUS_CONSOLE_ORANGE,"[Team Battle] O jogador "..getCreatureName(cid).." do time "..times[sto].." foi morto!") doPlayerSendTextMessage(cid,MESSAGE_STATUS_WARNING,"[Team Battle] You are dead!") realTeamBattle.cleanPlayer(cid) realTeamBattle.checkTeams() end end return true end function onLogin(cid) doPlayerSetStorageValue(cid, realTeamBattle.teamStorage,-1) registerCreatureEvent(cid, "realTeamBattleDeath") registerCreatureEvent(cid, "realTeamBattleCombat") registerCreatureEvent(cid, "realTeamBattleTarget") return true end
Postado Fevereiro 19, 2017 8 anos Solução function onCombat(cid, target) if isPlayer(cid) and isPlayer(target) then local a,b = getPlayerStorageValue(cid, realTeamBattle.teamStorage),getPlayerStorageValue(target, realTeamBattle.teamStorage) if a > 0 and b > 0 and a == b then return false end end return true end function onTarget(cid, target) if isPlayer(cid) and isPlayer(target) then local a,b = getPlayerStorageValue(cid, realTeamBattle.teamStorage),getPlayerStorageValue(target, realTeamBattle.teamStorage) if a > 0 and b > 0 and a == b then doPlayerSendCancel(cid,"Você não pode atacar seu companheiro de time.") return false end end return true end function onPrepareDeath(cid, deathList) if isPlayer(cid) then local sto = getPlayerStorageValue(cid,realTeamBattle.teamStorage) if sto > 0 then local times = {"Red Assassins", "Blue Norsemen", "Black Hunters", "Green Beggars"} realTeamBattle.broadcast(MESSAGE_STATUS_CONSOLE_ORANGE,"[Team Battle] O jogador "..getCreatureName(cid).." do time "..times[sto].." foi morto!") doPlayerSendTextMessage(cid,MESSAGE_STATUS_WARNING,"[Team Battle] You are dead!") realTeamBattle.cleanPlayer(cid) realTeamBattle.checkTeams() end end return true end function onLogin(cid) doPlayerSetStorageValue(cid, realTeamBattle.teamStorage,-1) registerCreatureEvent(cid, "realTeamBattleDeath") registerCreatureEvent(cid, "realTeamBattleCombat") registerCreatureEvent(cid, "realTeamBattleTarget") return true end [*Ninguém será digno do sucesso se não usar suas derrotas para conquistá-lo.*] DISCORD: vodkart#6090
Postado Fevereiro 19, 2017 8 anos Autor 9 minutos atrás, Vodkart disse: function onCombat(cid, target) if isPlayer(cid) and isPlayer(target) then local a,b = getPlayerStorageValue(cid, realTeamBattle.teamStorage),getPlayerStorageValue(target, realTeamBattle.teamStorage) if a > 0 and b > 0 and a == b then return false end end return true end function onTarget(cid, target) if isPlayer(cid) and isPlayer(target) then local a,b = getPlayerStorageValue(cid, realTeamBattle.teamStorage),getPlayerStorageValue(target, realTeamBattle.teamStorage) if a > 0 and b > 0 and a == b then doPlayerSendCancel(cid,"Você não pode atacar seu companheiro de time.") return false end end return true end function onPrepareDeath(cid, deathList) if isPlayer(cid) then local sto = getPlayerStorageValue(cid,realTeamBattle.teamStorage) if sto > 0 then local times = {"Red Assassins", "Blue Norsemen", "Black Hunters", "Green Beggars"} realTeamBattle.broadcast(MESSAGE_STATUS_CONSOLE_ORANGE,"[Team Battle] O jogador "..getCreatureName(cid).." do time "..times[sto].." foi morto!") doPlayerSendTextMessage(cid,MESSAGE_STATUS_WARNING,"[Team Battle] You are dead!") realTeamBattle.cleanPlayer(cid) realTeamBattle.checkTeams() end end return true end function onLogin(cid) doPlayerSetStorageValue(cid, realTeamBattle.teamStorage,-1) registerCreatureEvent(cid, "realTeamBattleDeath") registerCreatureEvent(cid, "realTeamBattleCombat") registerCreatureEvent(cid, "realTeamBattleTarget") return true end Se não for ocupar seu tempo, me explica oque você removeu ou adicionou?
Postado Fevereiro 20, 2017 8 anos é que vc tava checando se o jogador 'cid' que atacava tinha stor > 0 mas não checou se o 'target' quem é atacado, tinha a stor > 0 também! [*Ninguém será digno do sucesso se não usar suas derrotas para conquistá-lo.*] DISCORD: vodkart#6090
Participe da conversa
Você pode postar agora e se cadastrar mais tarde. Se você tem uma conta, faça o login para postar com sua conta.