local cost = 10000
function onSay(cid, words, param, channel)
if getPlayerMoney(cid) < cost then
doPlayerSendCancel(cid,"You dont have enogh money.")
end
if getPlayerPromotionLevel(cid) == 1 then
doPlayerSendCancel(cid,"You are already promoted")
end
setPlayerPromotionLevel(cid,1)
doSendAnimatedText(getThingPos(cid),"Promoted!",TEXTCOLOR_GREEN)
doSendMagicEffect(getThingPos(cid),49)
doPlayerRemoveMoney(cid,cost)
return true
end
local cost = 10000
function onSay(cid, words, param, channel)
if (getPlayerMoney(cid) < cost) then
doPlayerSendCancel(cid,"You dont have enogh money.")
elseif (getPlayerPromotionLevel(cid) == 1) then
doPlayerSendCancel(cid,"You are already promoted")
else
setPlayerPromotionLevel(cid,1)
doSendAnimatedText(getThingPos(cid),"Promoted!",TEXTCOLOR_GREEN)
doSendMagicEffect(getThingPos(cid),49)
doPlayerRemoveMoney(cid,cost)
end
return true
end
............promotion.lua/:13: '<eof>' expected near 'end'
Hmm try this:
LUA:local cost = 10000 function onSay(cid, words, param, channel) if (getPlayerMoney(cid) < cost) then doPlayerSendCancel(cid,"You dont have enogh money.") elseif (getPlayerPromotionLevel(cid) == 1) then doPlayerSendCancel(cid,"You are already promoted") else setPlayerPromotionLevel(cid,1) doSendAnimatedText(getThingPos(cid),"Promoted!",TEXTCOLOR_GREEN) doSendMagicEffect(getThingPos(cid),49) doPlayerRemoveMoney(cid,cost) end return true end
............promotion.lua/:13: '<eof>' expected near 'end'
ye if u used mine as i told you write return true before last end.
promotion
LUA:local cost = 10000 function onSay(cid, words, param, channel) if getPlayerMoney(cid) < cost then doPlayerSendCancel(cid,"You dont have enogh money.") end if getPlayerPromotionLevel(cid) == 1 then doPlayerSendCancel(cid,"You are already promoted") end setPlayerPromotionLevel(cid,1) doSendAnimatedText(getThingPos(cid),"Promoted!",TEXTCOLOR_GREEN) doSendMagicEffect(getThingPos(cid),49) doPlayerRemoveMoney(cid,cost) return true end
It is the one i made earlier on this post but i think he copyed it wrong.stop posting errors and post your script here or the piece of code that is givin error
local cost = 10000
function onSay(cid, words, param, channel)
if getPlayerMoney(cid) < cost then
doPlayerSendCancel(cid,"You dont have enogh money.")
end
if getPlayerPromotionLevel(cid) == 1 then
doPlayerSendCancel(cid,"You are already promoted")
end
setPlayerPromotionLevel(cid,1)
doSendAnimatedText(getThingPos(cid),"Promoted!",TEXTCOLOR_GREEN)
doSendMagicEffect(getThingPos(cid),49)
doPlayerRemoveMoney(cid,cost)
return true
end
local costi = 10000
function onSay(cid, words, param, channel)
if getPlayerPromotionLevel(cid) < 1 then
if doPlayerRemoveMoney(cid, 60000) == TRUE then
setPlayerPromotionLevel(cid,1)
doSendAnimatedText(getThingPos(cid),"Promoted!",TEXTCOLOR_GREEN)
doSendMagicEffect(getThingPos(cid),49)
else
doPlayerSendCancel(cid,"You dont have enogh money, you need ".. costi .." money for promotion.")
end
else
doPlayerSendCancel(cid,"You are already promoted")
end
return true
end
here is my scrip dude
line 13Code:local cost = 10000 function onSay(cid, words, param, channel) if getPlayerMoney(cid) < cost then doPlayerSendCancel(cid,"You dont have enogh money.") end if getPlayerPromotionLevel(cid) == 1 then doPlayerSendCancel(cid,"You are already promoted") end setPlayerPromotionLevel(cid,1) doSendAnimatedText(getThingPos(cid),"Promoted!",TEXTCOLOR_GREEN) doSendMagicEffect(getThingPos(cid),49) doPlayerRemoveMoney(cid,cost) return true end
Lol, I thought there was something wrong in this script and I rewrote it... -_-hey sonical it is just a question, can you see an error in my script as i rlly cant find one, i think all ends are there right?![]()