[Error - Action Interface]
data/actions/scripts/pokedex.lua:onUse
Description:
data/actions/scripts/pokedex.lua:36: attempt to index field '?'(a number value)
stack traceback:
data/actions/scripts/pokedex.lua:36:infunction<data/actions/scripts/pokedex.lua:3>
Você tem o código disponível? Se tiver publique-o aqui:
local rate =20function onUse(cid, item, fromPos, item2, toPos)ifnot isCreature(item2.uid)thenreturntrueendlocal poke = getCreatureName(item2.uid)if isMonster(item2.uid)thenlocal this = newpokedex[getCreatureName(item2.uid)]local myball =0if isSummon(item2.uid)then
myball = getPlayerSlotItem(getCreatureMaster(item2.uid),8)endifnot getPlayerInfoAboutPokemon(cid, poke).dex thenlocal exp = this.level * rate
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE,"You have unlocked "..getCreatureName(item2.uid).." in your pokedex!")
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE,"You have gained "..exp.." experience points.")
doSendMagicEffect(getThingPos(cid),210)
doPlayerAddExperience(cid, exp)
doAddPokemonInDexList(cid, poke)else
doShowPokedexRegistration(cid, item2, myball)endreturntrueendifnot isPlayer(item2.uid)thenreturntrueendlocal kanto =0local johto =0--alterado v1.7 \/\/for i =1,#oldpokedex doif getPlayerInfoAboutPokemon(item2.uid, oldpokedex[i][1]).dex thenif i <=151then
kanto = kanto+1elseif i >=209then
johto = johto+1endendend--alterado v1.6local player = getRecorderPlayer(toPos, cid)if cid == player then
doPlayerSendTextMessage(cid,27,"You has unlocked "..kanto.." kanto's and "..johto.." johto's pokémons until now.")
doPlayerSetVocation(cid,9)--alterado v1.6
openChannelDialog(cid)endreturntrueend
Base:
POU - Open Source (0.3.6)
Qual erro está surgindo/O que você procura?
Você tem o código disponível? Se tiver publique-o aqui:
Agradeço quem puder ajudar!
Compartilhar este post
Link para o post
Compartilhar em outros sites