Look at this code I tryd like 10 times but it just keep giving me error >.<
error:
0.3.6_DEV but and old one soo I think its normal 3.6 now ^^
rep++
LUA:
function onSay(cid, words, param)
if getPlayerBlessing(cid, 1) or getPlayerBlessing(cid, 2) or getPlayerBlessing(cid, 3) or getPlayerBlessing(cid, 4) or getPlayerBlessing(cid, 5) then
doPlayerSendCancel(cid,'You have already been blessed')
doPlayerSendMagicEffect(getPlayerPosition(cid), CONST_ME_POFF)
else
for i = 1,5 do
if doPlayerAddBlessing(cid, i) == TRUE then
doPlayerRemoveMoney(cid, 25000)
doSendMagicEffect(getPlayerPosition(cid), CONST_ME_HOLYDAMAGE)
doPlayerSendTextMessage(cid,MESSAGE_EVENT_ADVANCE,'You have been blessed by the gods!')
else
doPlayerSendCancel(cid, "You need 25 crystal coin to get blessed!")
doPlayerSendMagicEffect(getPlayerPosition(cid), CONST_ME_POFF)
end
return 1
end
end
error:
Code:
[11/06/2010 20:32:50] [Error - LuaScriptInterface::loadFile] data/talkactions/scripts/bless.lua:16: 'end' expected (to close 'function' at line 1) near '<eof>'
[11/06/2010 20:32:50] [Warning - Event::loadScript] Cannot load script (data/talkactions/scripts/bless.lua)
[11/06/2010 20:32:50] data/talkactions/scripts/bless.lua:16: 'end' expected (to close 'function' at line 1) near '<eof>'
[11/06/2010 20:32:50] Reloaded talk actions.
0.3.6_DEV but and old one soo I think its normal 3.6 now ^^
rep++