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

Whats wrong with this quest?

Status
Not open for further replies.

Rhumor

Dutch & Proud
Joined
Jul 7, 2007
Messages
451
Reaction score
2
Solved! Whats wrong with this quest?

function onUse(cid, item, frompos, item2, topos)
if item.uid == 5006 then
queststatus = getPlayerStorageValue(cid,2008)
if queststatus == -1 then
doPlayerSendTextMessage(cid,22,"You have found your first armor.")
doPlayerAddItem(cid,2465,1)
setPlayerStorageValue(cid,2008,1)
else
doPlayerSendTextMessage(cid,22,"You already have your first armor.")
end
end

it keeps whining `end` expected to close `function` at line 1 near `<eof>`
nomatter howmutch ends I place on the end...
 
Last edited:
You left one "end":

PHP:
function onUse(cid, item, frompos, item2, topos)
  if item.uid == 5006 then
    queststatus = getPlayerStorageValue(cid,2008)
    if queststatus == -1 then
      doPlayerSendTextMessage(cid,22,"You have found your first armor.")
      doPlayerAddItem(cid,2465,1)
      setPlayerStorageValue(cid,2008,1)
    else
      doPlayerSendTextMessage(cid,22,"You already have your first armor.")
    end
  end
end
 
Status
Not open for further replies.
Back
Top