Hello, i got this sctipt not that long ago
it worked perfect then now i get this error
(Made for addskill but demote insted)
Code:
function onSay(cid, words, param, channel)
t = string.explode(param, ",", 2)
pid = getPlayerByName(t[1])
level = tonumber(t[2])
doPlayerAddLevel(pid, -level)
return true
end
it worked perfect then now i get this error
Code:
[24/02/2013 15:39:05] [Error - TalkAction Interface]
[24/02/2013 15:39:05] data/talkactions/scripts/demote.lua:onSay
[24/02/2013 15:39:05] Description:
[24/02/2013 15:39:05] data/talkactions/scripts/demote.lua:5: attempt to perform arithmetic on global 'level' (a nil value)
[24/02/2013 15:39:05] stack traceback:
[24/02/2013 15:39:05] data/talkactions/scripts/demote.lua:5: in function <data/talkactions/scripts/demote.lua:1>
(Made for addskill but demote insted)