• There is NO official Otland's Discord server and NO official Otland's server list. The Otland's Staff does not manage any Discord server or server list. Moderators or administrator of any Discord server or server lists have NO connection to the Otland's Staff. Do not get scammed!

What's wrong with this script?

Joined
Jun 19, 2009
Messages
1,852
Reaction score
5
Hello!

What's wrong with this script? :p

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.lua:eek:nUse
[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!
 
lol, thanks :D

A question though, why when you click the item you say this:

"You are now a 12!" 12 = super knight, is there any way to make it say super knight for knights, pally for pallys etc.

Also, the "doCreatureSay" isn't like a monster text; it isn't orange :eek:
 
Last edited by a moderator:
Thanks man, works.

But do you know why when players click on the item, the orange text (doCreatureSay) doesn't appear - the default chat text appears instead :eek:
 
Back
Top