Does anyone help me with this error?
Code:
Lua Script Error: [Event Interface]
data/events/scripts/player.lua:Player@onLook
data/events/scripts/player.lua:161: attempt to compare number with nil
stack traceback:
[C]: in function '__le'
data/events/scripts/player.lua:161: in function <data/events/scripts/pla
yer.lua:101>
Code:
if thing:isPlayer() then
local loyalty = LOYALTY_STORAGE[thing.uid]
for key = 1, #LOYALTY_TITLES do
if loyalty >= LOYALTY_TITLES[key][1] then
description = description .. (thing:getSex() == 0 and " She" or " He") .. " is a " .. LOYALTY_TITLES[key][2] .. " of ' .. configManager.getString(configKeys.SERVER_NAME) .. '."
break
end
end
end