• 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!
  • 2026 staff recruitment is open! Check it out and consider applying!

Error when i open Yalahar Quest Chest

Tyson12302

New Member
Joined
Aug 6, 2014
Messages
264
Reaction score
4
I get this error when i open the Yalahar Quest Chest. It opens the chest and shows the item inside it instead of just giving it to me.
[06/06/2015 14:44:50] [Error - Action Interface]
[06/06/2015 14:44:50] data/actions/scripts/quests/yalaharrewards.lua:onUse
[06/06/2015 14:44:50] Description:
[06/06/2015 14:44:50] data/actions/scripts/quests/yalaharrewards.lua:21: attempt to index local 'player' (a number value)
[06/06/2015 14:44:50] stack traceback:
[06/06/2015 14:44:50] data/actions/scripts/quests/yalaharrewards.lua:21: in function <data/actions/scripts/quests/yalaharrewards.lua:1>

Heres my Yalaharchest script.

LUA:
function onUse(player, item, fromPosition, target, toPosition, isHotkey)
    if(item.uid == 3088) then
        if(player:getStorageValue(Storage.InServiceofYalahar.Questline) == 53) then
            player:setStorageValue(Storage.InServiceofYalahar.Questline, 54)
            player:setStorageValue(Storage.InServiceofYalahar.Mission10, 5) -- StorageValue for Questlog "Mission 10: The Final Battle"
            player:addItem(9776, 1)
            player:sendTextMessage(MESSAGE_EVENT_ADVANCE, "You have found a yalahari armor.")
        else
            player:sendTextMessage(MESSAGE_EVENT_ADVANCE, "The chest is empty.")
        end
    elseif(item.uid == 3089) then
        if(player:getStorageValue(Storage.InServiceofYalahar.Questline) == 53) then
            player:setStorageValue(Storage.InServiceofYalahar.Questline, 54)
            player:setStorageValue(Storage.InServiceofYalahar.Mission10, 5) -- StorageValue for Questlog "Mission 10: The Final Battle"
            player:addItem(9778, 1)
            player:sendTextMessage(MESSAGE_EVENT_ADVANCE, "You have found a yalahari mask.")
        else
            player:sendTextMessage(MESSAGE_EVENT_ADVANCE, "The chest is empty.")
        end
    elseif(item.uid == 3090) then
        if(player:getStorageValue(Storage.InServiceofYalahar.Questline) == 53) then
            player:setStorageValue(Storage.InServiceofYalahar.Questline, 54)
            player:setStorageValue(Storage.InServiceofYalahar.Mission10, 5) -- StorageValue for Questlog "Mission 10: The Final Battle"
            player:addItem(9777, 1)
            player:sendTextMessage(MESSAGE_EVENT_ADVANCE, "You have found a yalahari leg piece.")
        else
            player:sendTextMessage(MESSAGE_EVENT_ADVANCE, "The chest is empty.")
        end
    end
    return true
end
 
Distro?
Most likely that you are running 1.0 or an old 1.1.
You have to compile the player in that case, if you don't know how to do it then do yourself a favor and update to 1.2.
 
at the top
I still get the error when i open the chest.
[06/06/2015 17:36:45] [Error - Action Interface]
[06/06/2015 17:36:45] data/actions/scripts/quests/yalaharrewards.lua:onUse
[06/06/2015 17:36:45] Description:
[06/06/2015 17:36:45] data/actions/scripts/quests/yalaharrewards.lua:2: attempt to call local 'player' (a number value)
[06/06/2015 17:36:45] stack traceback:
[06/06/2015 17:36:45] data/actions/scripts/quests/yalaharrewards.lua:2: in function <data/actions/scripts/quests/yalaharrewards.lua:1>

Heres how my code looks now
Code:
function onUse(player, item, fromPosition, target, toPosition, isHotkey)
local player = Player(cid)
if(item.uid == 3088) then
if(player:getStorageValue(Storage.InServiceofYalahar.Questline) == 53) then
player:setStorageValue(Storage.InServiceofYalahar.Questline, 54)
player:setStorageValue(Storage.InServiceofYalahar.Mission10, 5) -- StorageValue for Questlog "Mission 10: The Final Battle"
player:addItem(9776, 1)
player:sendTextMessage(MESSAGE_EVENT_ADVANCE, "You have found a yalahari armor.")
else
player:sendTextMessage(MESSAGE_EVENT_ADVANCE, "The chest is empty.")
end
elseif(item.uid == 3089) then
if(player:getStorageValue(Storage.InServiceofYalahar.Questline) == 53) then
player:setStorageValue(Storage.InServiceofYalahar.Questline, 54)
player:setStorageValue(Storage.InServiceofYalahar.Mission10, 5) -- StorageValue for Questlog "Mission 10: The Final Battle"
player:addItem(9778, 1)
player:sendTextMessage(MESSAGE_EVENT_ADVANCE, "You have found a yalahari mask.")
else
player:sendTextMessage(MESSAGE_EVENT_ADVANCE, "The chest is empty.")
end
elseif(item.uid == 3090) then
if(player:getStorageValue(Storage.InServiceofYalahar.Questline) == 53) then
player:setStorageValue(Storage.InServiceofYalahar.Questline, 54)
player:setStorageValue(Storage.InServiceofYalahar.Mission10, 5) -- StorageValue for Questlog "Mission 10: The Final Battle"
player:addItem(9777, 1)
player:sendTextMessage(MESSAGE_EVENT_ADVANCE, "You have found a yalahari leg piece.")
else
player:sendTextMessage(MESSAGE_EVENT_ADVANCE, "The chest is empty.")
end
end
return true
end
 
That fixed that error but i get another. And yes im using 0.3/0.4 TFS.
[06/06/2015 18:49:03] [Error - Action Interface]
[06/06/2015 18:49:03] data/actions/scripts/quests/yalaharrewards.lua:onUse
[06/06/2015 18:49:03] Description:
[06/06/2015 18:49:03] data/actions/scripts/quests/yalaharrewards.lua:14: attempt to index local 'k' (a nil value)
[06/06/2015 18:49:03] stack traceback:
[06/06/2015 18:49:03] data/actions/scripts/quests/yalaharrewards.lua:14: in function <data/actions/scripts/quests/yalaharrewards.lua:7>
 
And another error i got
[06/06/2015 19:20:47] [Error - Action Interface]
[06/06/2015 19:20:47] data/actions/scripts/quests/yalaharrewards.lua:onUse
[06/06/2015 19:20:47] Description:
[06/06/2015 19:20:47] data/actions/scripts/quests/yalaharrewards.lua:9: attempt to index global 'Storage' (a nil value)
[06/06/2015 19:20:47] stack traceback:
[06/06/2015 19:20:47] data/actions/scripts/quests/yalaharrewards.lua:9: in function <data/actions/scripts/quests/yalaharrewards.lua:7>
 
Back
Top