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

Lua Bug in script

Bonnen888

Member
Joined
Oct 19, 2008
Messages
99
Reaction score
7
Location
Sweden
Can someone tell me why it doesn't work this script, everytime i click on the chest i get debug. But i get the 25 crystal coins
No other item.uid is the same.
Using 0.2

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

        if item.uid == 62624 then
        queststatus = getPlayerStorageValue(cid,5641)
        if queststatus == -1 then
        doPlayerSendTextMessage(cid,22,"You have found 25 crystal coins.")
        doPlayerAddItem(cid,2160,25)
        setPlayerStorageValue(cid,5641,1)
        else
        doPlayerSendTextMessage(cid,22,"It is empty.")
        end
        else
        return 0
        end

        return 1
        end
 
Maybe it's the morning talking here, but I don't seem to quite understand this
Code:
if queststatus == -1 then
Maybe it would be better if it was
Code:
if queststatus != 5641 then

Assuming you crashed right when you opened the chest and did not see the message, this may be what is debugging you ...
 
Last edited:
Maybe it's the morning talking here, but I don't seem to quite understand this
Code:
if queststatus == -1 then
Maybe it would be better if it was
Code:
if queststatus != 5641 then

Assuming you crashed right when you opened the chest and did not see the message, this may be what is debugging you ...

Yee, it did.
Thank you man
 

Similar threads

Back
Top