I made this script so people could only get the loot for their Vocation, i havnt put in what the loot is.. but its throwing a easy error that i cant figure out. here it is.. please fix it men, i know you guys know what your doing
This is the error i get
Code:
-- Newvocquest
function onUse(cid, item, frompos, item2, topos)
if item.uid == 17200 then
queststatus = getPlayerStorageValue(cid,17200)
if (getPlayerVocation(cid) == 3) then
if queststatus == -1 then
doPlayerSendTextMessage(cid,22,"You have found a paladin set")
doPlayerAddItem(cid,2152,35)
setPlayerStorageValue(cid,17200,1)
else
doPlayerSendTextMessage(cid,22,"You already have chosen your vocation set")
end
elseif item.uid == 17201 then
queststatus = getPlayerStorageValue(cid,17201)
if (getPlayerVocation(cid) == 4) then
if queststatus == -1 then
doPlayerSendTextMessage(cid,22,"You have found A Knight Set.")
doPlayerAddItem(cid,2445,35)
setPlayerStorageValue(cid,17201,1)
else
doPlayerSendTextMessage(cid,22,"You already have chosen your vocation set")
end
elseif item.uid == 17202 then
queststatus = getPlayerStorageValue(cid,17202)
if (getPlayerVocation(cid) == 2) then
if queststatus == -1 then
doPlayerSendTextMessage(cid,22,"You have found A Druid Set.")
doPlayerAddItem(cid,2445,35)
setPlayerStorageValue(cid,17202,1)
else
doPlayerSendTextMessage(cid,22,"You already have chosen your vocation set")
end
elseif item.uid == 17203 then
queststatus = getPlayerStorageValue(cid,17203)
if (getPlayerVocation(cid) == 1) then
if queststatus == -1 then
doPlayerSendTextMessage(cid,22,"You have found A Sorcerer Set.")
doPlayerAddItem(cid,2445,35)
setPlayerStorageValue(cid,17203,1)
else
doPlayerSendTextMessage(cid,22,"You already have chosen your vocation set")
end
else
return 0
end
return 1
end
This is the error i get
Code:
Warning: [Event::loadScript] Can not load script. data/actions/scripts/quests/NV
Q.lua
data/actions/scripts/quests/NVQ.lua:8: 'then' expected near 'queststatus'
Warning: [Event::loadScript] Can not load script. data/actions/scripts/quests/NV
Q.lua
data/actions/scripts/quests/NVQ.lua:8: 'then' expected near 'queststatus'
Warning: [Event::loadScript] Can not load script. data/actions/scripts/quests/NV
Q.lua
data/actions/scripts/quests/NVQ.lua:8: 'then' expected near 'queststatus'
Warning: [Event::loadScript] Can not load script. data/actions/scripts/quests/NV
Q.lua
data/actions/scripts/quests/NVQ.lua:8: 'then' expected near 'queststatus'