• 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 Loot Corpse / others stand 2 sqm away

Zt0ffe

New Member
Joined
Sep 26, 2008
Messages
341
Reaction score
4
Location
Sweden
Hello,

I open an corpse then go away up to 2sqm away and still have it open for some reason? Same with depots etc, everything you can open.

Anyone know where I might find this in the source? Or solve it someother how?

a39AEJV.png



Kind Regards,
 
Last edited:
When ever you debug a script you always work from the top down, fix each error one at a time so that you don't create other errors in the process.
1st error you have is on line 57, it says your trying to perform an arithmetic operation on a string
Code:
setPlayerStorageValue(cid, storage + 555884621212, 1)
The variable storage is defined on line 22 as a string, naturally you can't add a word to a number and expect a higher number
Code:
local storage = tostring(result.getDataString(result_plr, "param7"))
If the expected value in param7 is a number then you need to change line 22 with
Code:
local storage = result.getDataInt(result_plr, "param7")

The original script can be found here
https://otland.net/threads/shop-lua-for-tfs-1-0.201559/
 
When ever you debug a script you always work from the top down, fix each error one at a time so that you don't create other errors in the process.
1st error you have is on line 57, it says your trying to perform an arithmetic operation on a string
Code:
setPlayerStorageValue(cid, storage + 555884621212, 1)
The variable storage is defined on line 22 as a string, naturally you can't add a word to a number and expect a higher number
Code:
local storage = tostring(result.getDataString(result_plr, "param7"))
If the expected value in param7 is a number then you need to change line 22 with
Code:
local storage = result.getDataInt(result_plr, "param7")

The original script can be found here
https://otland.net/threads/shop-lua-for-tfs-1-0.201559/


Thanks. Yes the storage ID is used for this code: Much more lines just didnt copy all of it. But u see the point.
Code:
function onLogin(cid)
if getPlayerStorageValue(cid, 80+555884621212) == 1 then
doPlayerAddMount(cid, 6)
doPlayerSendTextMessage(cid, 18, 'You received mount from ArenaTibia Shop.')
setPlayerStorageValue(cid, 80+555884621212, 2)

elseif getPlayerStorageValue(cid, 81+555884621212) == 1 then
doPlayerSendTextMessage(cid, 18, 'You received mount from ArenaTibia Shop.')
doPlayerAddMount(cid, 20)
setPlayerStorageValue(cid, 81+555884621212, 2)

elseif getPlayerStorageValue(cid, 129+555884621212) == 1 then
doPlayerSendTextMessage(cid, 18, 'You received addon full from ArenaTibia Shop.')
doPlayerAddOutfit(cid, 637, 3)
doPlayerAddOutfit(cid, 636, 3)
setPlayerStorageValue(cid, 129+555884621212, 2)
    end
    return TRUE
end
 
To get help if anyone know how I might solve the opening problems? 0.o
Well you haven't posted the other scripts, how can someone help you if they don't know what to look for, sure you provided the errors, the path to the scripts even the line they are on, but until you produce the actual code there isn't anything anyone can do for you.
 
Well you haven't posted the other scripts, how can someone help you if they don't know what to look for, sure you provided the errors, the path to the scripts even the line they are on, but until you produce the actual code there isn't anything anyone can do for you.

I got no errors from the opening thing thats why I didnt post anything about it. Maybe somone else had the same problem and knows something about this? Did you ever think of that? Instead of going on every thread on Otland making unnecessary posts, hold them to yourself. I mean its supposed to be a SUPPORT forum to help people, not coming here kinda saying Im a retard? Havent been doing OT for over a year and have to say back then. People where lot nicer.

@Tarek1337 so I guess it is. Know in maybe what file I might find this problem in? thanks in advance
 
Last edited:
I got no errors from the opening thing thats why I didnt post anything about it. Maybe somone else had the same problem and knows something about this? Did you ever think of that? Instead of going on every thread on Otland making unnecessary posts, hold them to yourself. I mean its supposed to be a SUPPORT forum to help people, not coming here kinda saying Im a retard? Havent been doing OT for over a year and have to say back then. People where lot nicer.

@Tarek1337 so I guess it is. Know in maybe what file I might find this problem in? thanks in advance
I never said you were a retard, i gave you a solution for the 1st problem, then you posted a login script, which had absolutely nothing to do with the errors in the original post.
Now your given me shit because I suggest you post the additional code you had errors if any plus the errors, you never explained any additional problems there after.. so if you want to be mad at anyone be mad at yourself.

As @Tarek1337 suggested maybe you are using a bugged distro.
 
Last edited:
I never said you were a retard, i gave you a solution for the 1st problem, then you posted a login script, which had absolutely nothing to do with the errors in the original post.
Now your given me shit because I suggest you post the additional code you had errors if any plus the errors, you never explained any additional problems there after.. so if you want to be mad at anyone be mad at yourself.

As @Tarek1337 suggested maybe you are using a bugged distro.

Yea. But still if there was a solution for the opening problem or another 10.82 src with cast I would be real happy!
 
Back
Top Bottom