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

TFS 1.X+ getplayerexperience error

Joriku

Working in the mines, need something?
Joined
Jul 16, 2016
Messages
1,175
Solutions
17
Reaction score
481
Location
Sweden
Hi,
keep getting this error on some reboots or some random time messing up the whole experience system..
b1d046f36d9860674814d6c7c322ff7e.png


Things i think or thoughts of why:
global.lua: this is changed due to the death system i use: [TFS 1.4] Level loss system/store level by .txt document (https://otland.net/threads/tfs-1-4-level-loss-system-store-level-by-txt-document.278676/#post-2679476)
LUA:
function getExperienceForLevel(level)
        level = level - 1
        return ((50 * level * level * level) - (150 * level * level) + (400 * level)) / 3
end

then.. the player.lua is attached
Why does this happen?
 

Attachments

Solution
Can you post your data/stages.lua file?

Error keeps talking about getting a string instead of a table, and the function in question is attempting to grab information about experience stages, so I'm assuming something is wrong with the experience table.
Here, attached onto thread. Can't spot anything other than a 0 on magic level..
Was dumb, it solved the issue. Changing a 0 value
Can you post your data/stages.lua file?

Error keeps talking about getting a string instead of a table, and the function in question is attempting to grab information about experience stages, so I'm assuming something is wrong with the experience table.
 
Can you post your data/stages.lua file?

Error keeps talking about getting a string instead of a table, and the function in question is attempting to grab information about experience stages, so I'm assuming something is wrong with the experience table.
Here, attached onto thread. Can't spot anything other than a 0 on magic level..
Was dumb, it solved the issue. Changing a 0 value
 

Attachments

Last edited:
Solution
Back
Top