fewdox
New Member
Getting error in script ...
ERROR :
Script :
ERROR :
[01/08/2010 20:30:41] [Error - LuaScriptInterface::loadFile] data/creaturescripts/scripts/aolbuyer.lua:28: '<eof>' expected near 'end'
[01/08/2010 20:30:41] [Warning - Event::loadScript] Cannot load script (data/creaturescripts/scripts/aolbuyer.lua)
[01/08/2010 20:30:41] data/creaturescripts/scripts/aolbuyer.lua:28: '<eof>' expected near 'end'
Script :
local config = {
storage = 3500,
price = 10000;
};
function onLogin(cid)
local storage, price = 3500, 10000 --config here
if getPlayerStorageValue(cid, (storage)) == 0 or getPlayerSlotItem(cid, CONST_SLOT_NECKLACE).itemid == 2173 then
return true
end
if doPlayerBuyItem(cid, 2173, 1, price, 1) then
doPlayerSendTextMessage(cid,MESSAGE_INFO_DESCR,"You have bought an amulet of loss automatically.")
else
doPlayerSendTextMessage(cid,MESSAGE_INFO_DESCR,"WARNING: You do not have enough money to buy an amulet of loss.")
end
return true
end
if getPlayerMoney(cid) < (config.price) then
doPlayerSendTextMessage(cid,MESSAGE_INFO_DESCR,"WARNING: You do not have enough money to buy an amulet of loss.")
return true
end
doPlayerRemoveMoney(cid, (config.price))
doPlayerAddItem(cid,2173,1)
doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "You have bought an amulet of loss automatically.")
return true
end