Synthetic_
deathzot.net
- Joined
- Dec 30, 2008
- Messages
- 2,535
- Reaction score
- 575
Well, I'm trying to make a script that when you use a rock, if you have 50k it will add 500 health
Error:
Whats wrong with it? I will REP++
LUA:
local cost = 50000
function onUse(cid, item, fromPosition, itemEx, toPosition)
doPlayerRemoveMoney(cid, cost) == TRUE then
doCreatureAddHealth(cid, 500)
doSendMagicEffect(getThingPos(cid), CONST_ME_TELEPORT)
doCreatureSay(cid, "Health+.", TALKTYPE_ORANGE_1)
elseif getPlayerMoney(cid) < cost then
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "You do not have enough skulls.")
end
return TRUE
end
Error:
Code:
[26/09/2009 19:27:43] [Warning - Event::loadScript] Cannot load script (data/actions/scripts/other/health.lua)
[26/09/2009 19:27:43] data/actions/scripts/other/health.lua:3: unexpected symbol near '=='
Whats wrong with it? I will REP++
Last edited: