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

Problem with strange value on storage

Pawcio6

Member
Joined
Sep 26, 2009
Messages
143
Solutions
4
Reaction score
15
Hi
After i added functions with entering table to storage players start getting weird value into storage. I removed all functions becouse i found another way to do a script but the problem is still pops on all kind of scripts with storage but only like 1 on 10000 i dont know what to think about it becouse the bugged value comes even on script like this
if getPlayerStorageValue(cid,10490) > 0 then
setPlayerStorageValue(cid,10490,-1)
end
Bez_nazwy3.png

I have 0.3.6 and the problem pops on all players and random keys. There is a problem with database? becouse even afk players get this problem in onThink script
 
i dont had any problems before this bug with -1 but the problem is on all values even on more than 1
 
Last edited:
-1 is the default value.
I believe it's classified as 'nil', but can be checked inside scripts if it's < 0.
Making the storage a negative integer will most likely cause issues.

Instead of placing it -1, make them 0.
It's effectively the same thing, but it won't cause random error's.
i dont had any problems before this bug with -1 but the problem is on all values even on more than 1
Yes, you can make the storage value anything from 0-65,000 ish. But -1 is a no-go zone. :p
 
i dont know that before :D i will change some scripts but what with os.time() same bug?
sample script
Code:
if os.time() > getPlayerStorageValue(attacker,29010) then
setPlayerStorageValue(attacker, 29012,(getPlayerStorageValue(attacker,29012) + value ))
setPlayerStorageValue(attacker, 29011,1)
setPlayerStorageValue(attacker, 29010,(os.time() + 3 ))
mostly with 29010 sometimes 29011
 
Back
Top