Hi
Im trying to fix that cd bar will not display error but i fail :/
Its working good when you dont got the error ball, but when you got the error ball the text come out but i get console error :/
Rep will be given!
Im trying to fix that cd bar will not display error but i fail :/
Its working good when you dont got the error ball, but when you got the error ball the text come out but i get console error :/
LUA:
[06/07/2012 19:38:54] [Error - TalkAction Interface]
[06/07/2012 19:38:54] data/talkactions/scripts/cdbar.lua:onSay
[06/07/2012 19:38:54] Description:
[06/07/2012 19:38:54] data/lib/cooldown bar.lua:39: attempt to perform arithmetic on a nil value
[06/07/2012 19:38:54] stack traceback:
[06/07/2012 19:38:54] data/lib/cooldown bar.lua:39: in function 'doUpdatePokemonsBar'
[06/07/2012 19:38:54] data/talkactions/scripts/cdbar.lua:17: in function <data/talkactions/scripts/cdbar.lua:3>
LUA:
function onSay(cid, words, param)
if words == "/pokeread" then
if getArticle(pokename) == "error" then
doPlayerSendTextMessage(cid, 26, "One of your pokes are bugged, the cdbar couldnt update.")
elseif not getArticle(name2) == "error" then
if #getCreatureSummons(cid) >= 1 then
local pokemon = getCreatureSummons(cid)[1]
local pokelife = (getCreatureHealth(pokemon) / getCreatureMaxHealth(pokemon))
doItemSetAttribute(getPlayerSlotItem(cid, 8).uid, "hp", pokelife)
end
end
doUpdatePokemonsBar(cid)
end
return 0
end
Rep will be given!