- Joined
- Jun 19, 2009
- Messages
- 1,852
- Reaction score
- 5
Hello!
What's wrong with this script?
error in console:
thanks!
What's wrong with this script?
Code:
function onUse (cid, item, fromPosition, itemEx, toPosition)
local voc = getPlayerPromotionLevel(cid)
if voc == 1 then
if getPlayerLevel(cid) >= 15000 then
doCreatureSay(cid,"You are now a "..getPlayerVocation(cid).."!")
else
doPlayerSendCancel(cid,"You have to be over level 15000 to get super promoted.")
end
else
doPlayerSendCanel(cid,"You need to have a normal promotion in order to get super promotion.")
end
return true
end
error in console:
[19:9:37.084] [Error - Action Interface]
[19:9:37.085] data/actions/scripts/tools/super.luanUse
[19:9:37.085] Description:
[19:9:37.085] data/actions/scripts/tools/super.lua:10: attempt to call global 'd
oPlayerSendCanel' (a nil value)
[19:9:37.086] stack traceback:
[19:9:37.086] data/actions/scripts/tools/super.lua:10: in function <data/actio
ns/scripts/tools/super.lua:1>
thanks!