• 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 Unknown Value Error

Extrodus

|| Blazera.net ||
Premium User
Joined
Dec 22, 2008
Messages
2,724
Solutions
7
Reaction score
534
Location
Canada
Hey there guys, Im having a issue with a script for offline training. For some strange reason, a players storage value randomly becomes completely empty or has a weird characters like "ÊÄ" and when that happens - this script wont function properly/let the player login due to the value not being -1 or between the value of 1-720, so Im trying to figure out how to check if that value is -1 or any other foreign value between 1-720, then setTime(cid, 720).

Code:
function OfflineTraining_initialize(cid)
    if(OfflineTraining_getTime(cid) == -1) then
        OfflineTraining_setTime(cid, 720)
        OfflineTraining_setLogoutTime(cid) -- block problem with first login 'add time'
    end
end

I dont know why the players will sometimes get an empty storage or foreign characters with this system, but hopefully we can figure out how to check if its any other value than between the numbers 0-720 and set the value for setTime.

Thanks!

Link to script: Action - Offline Training for 8.60

Bump!
 
Last edited by a moderator:
I checked this system. The libs someone posted in that topic are bugged as hell, they have many bugs and useless functions. This system needs to be rewritten from beginning.

Logic of this system is poor. It needs os.time() and getPlayerLastLogin(cid) in functions, not such crazy inventions. It's possible to do fully working system in 2 files and only with 2 storage ids.

I recommend to you to use different system. Also, even this one for 9.6 what elf published can be shortened by like 75%.
 
Last edited:
Back
Top