_Aion_
Nothing Else
Hello I would like to know how can I fix this problem>> attempt to perform arithmetic on a string value <<
've changed my distro several times, looked at the lib and I think it's all normal.
the database was to be a numbers example: 31231321454 and is getting '* Y (some strange symbols)
appears in this distro.
Here is the script
this is not just the script that this error, even in the MOD cybershot an error like this, I would like to know how to solve this problem because I'm having a lot of headaches.
Thank you.
sorry for my bad English
've changed my distro several times, looked at the lib and I think it's all normal.
the database was to be a numbers example: 31231321454 and is getting '* Y (some strange symbols)
appears in this distro.
Code:
[25.12.2011 16:00:15] [Error - CreatureScript Interface]
[12/25/2011 16:00:15] data / creaturescripts / scripts / attribute_points.lua: onAdvance
[12/25/2011 16:00:15] Description:
[12/25/2011 16:00:15] data / creaturescripts / scripts / attribute_points.lua: 6: attempt to perform arithmetic on a string value
[12/25/2011 16:00:15] stack traceback:
[12/25/2011 16:00:15] data / creaturescripts / scripts / attribute_points.lua: 6: in function <data/creaturescripts/scripts/attribute_points.lua:1>
Here is the script
Code:
function onAdvance(cid, skill, oldlevel, newlevel)
if skill == 8 then
if oldlevel < newlevel then
local addmana = getPlayerMaxMana(cid)
local addhp = getCreatureMaxHealth(cid)
local addattribute = (getPlayerStorageValue(cid, 47061)+(newlevel-oldlevel)*2) -- this is the line that corrupts the database and displays this error "attempt to perform arithmetic on a string value"
doSendAnimatedText(getPlayerPosition(cid), "Level UP", 129)
doSendMagicEffect(getPlayerPosition(cid),math.random(28, 30))
doCreatureAddHealth(cid, addhp)
doPlayerAddMana(cid, addmana)
setPlayerStorageValue(cid, 47061, addattribute)
end
end
return true
end
this is not just the script that this error, even in the MOD cybershot an error like this, I would like to know how to solve this problem because I'm having a lot of headaches.
Thank you.
sorry for my bad English
Last edited: