• 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!

Windows Action Script error

Strata

Hoster
Joined
Apr 12, 2010
Messages
124
Reaction score
6
Location
USA
i keep geting this error

[Error - LuaScriptInterface::loadFile] data/actions/scripts/quests/hellquest.lua:46: 'end' expected (to close 'if' at line 4) near '<eof>'
[05/07/2011 22:03:06] [Warning - Event::loadScript] Cannot load script (data/actions/scripts/quests/hellquest.lua)
[05/07/2011 22:03:06] data/actions/scripts/quests/hellquest.lua:46: 'end' expected (to close 'if' at line 4) near '<eof>'

function onUse(cid, item, frompos, item2, topos)


if item.uid == 20001 then
if getPlayerStorageValue(cid,20001) == -1 then
doPlayerSendTextMessage(cid,25,"You have found a Blessed Shield.")
doPlayerAddItem(cid,2523,1)
setPlayerStorageValue(cid,20001,1)
else
doPlayerSendTextMessage(cid,25,"The is empty.")
end


if item.uid == 20002 then
if getPlayerStorageValue(cid,20002) == -1 then
doPlayerSendTextMessage(cid,25,"You have found a Winning Lottery Ticket for 100mil exp.")
doPlayerAddItem(cid,5957,1)
setPlayerStorageValue(cid,20002,1)
else
doPlayerSendTextMessage(cid,25,"The is empty.")
end


if item.uid == 20003 then
if getPlayerStorageValue(cid,20003) == -1 then
doPlayerSendTextMessage(cid,25,"You have found a Helmet.")
doPlayerAddItem(cid,2343,1)
setPlayerStorageValue(cid,20003,1)
else
doPlayerSendTextMessage(cid,25,"The is empty.")
end


elseif item.uid == 20004 then
if getPlayerStorageValue(cid,20004) == -1 then
doPlayerSendTextMessage(cid,25,"You have found Dragon Legs.")
doPlayerAddItem(cid,2469,1)
setPlayerStorageValue(cid,20004,1)
else
doPlayerSendTextMessage(cid,25,"The is empty.")
end


end
return TRUE
end
 
Lua:
function onUse(cid, item, frompos, item2, topos)


if item.uid == 20001 then
if getPlayerStorageValue(cid,20001) == -1 then
doPlayerSendTextMessage(cid,25,"You have found a Blessed Shield.")
doPlayerAddItem(cid,2523,1)
setPlayerStorageValue(cid,20001,1)
else
doPlayerSendTextMessage(cid,25,"The is empty.")
end
end

if item.uid == 20002 then
if getPlayerStorageValue(cid,20002) == -1 then
doPlayerSendTextMessage(cid,25,"You have found a Winning Lottery Ticket for 100mil exp.")
doPlayerAddItem(cid,5957,1)
setPlayerStorageValue(cid,20002,1)
else
doPlayerSendTextMessage(cid,25,"The is empty.")
end
end


if item.uid == 20003 then
if getPlayerStorageValue(cid,20003) == -1 then
doPlayerSendTextMessage(cid,25,"You have found a Helmet.")
doPlayerAddItem(cid,2343,1)
setPlayerStorageValue(cid,20003,1)
else
doPlayerSendTextMessage(cid,25,"The is empty.")
end
end


elseif item.uid == 20004 then
if getPlayerStorageValue(cid,20004) == -1 then
doPlayerSendTextMessage(cid,25,"You have found Dragon Legs.")
doPlayerAddItem(cid,2469,1)
setPlayerStorageValue(cid,20004,1)
else
doPlayerSendTextMessage(cid,25,"The is empty.")
end


return TRUE
end

I recommend to you.
http://otland.net/f81/chest-system-110178/
And:
http://otland.net/f16/proper-tagging-110327/
 
Last edited:
still didt work

[05/07/2011 22:22:37] [Warning - Event::loadScript] Cannot load script (data/actions/scripts/quests/hellquest.lua)
[05/07/2011 22:22:37] data/actions/scripts/quests/hellquest.lua:36: 'end' expected (to close 'function' at line 1) near 'elseif'

now
 
Back
Top