• 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 Script Error: [Main Interface]

Svira

Active Member
Joined
Jan 27, 2008
Messages
267
Solutions
11
Reaction score
36
Hello i try to use this script:
Random Item Stats by zbizu

and have this error:
Code:
Lua Script Error: [Main Interface]
in a timer event called from:
(Unknown scriptfile)
data/creaturescripts/scripts/randomstats.lua:138: attempt to index local 'it_u' (a nil value)
stack traceback:
        [C]: ?
        data/creaturescripts/scripts/randomstats.lua:138: in function 'assign_loot_Stat'
        data/creaturescripts/scripts/randomstats.lua:252: in function <data/creaturescripts/scripts/randomstats.lua:247>


how to fix it?
 
Solution
I think about that function where called by addEvent (Line 2404), I think that you prevent that problem by adding this line between 2050 and 2051:
Lua:
 if it_u == nil then return false end
123.png
The line 2051 will be pushed to line 2052. Hope this solve your trouble.
On your script have a mistake with the var it_u, you need to post your script to give us more chance to help you.
script is: "data/creaturescripts/scripts/randomstats.lua"
 
Code:
Lua Script Error: [Main Interface]
in a timer event called from:
(Unknown scriptfile)
data/stats.lua:2051: attempt to index local 'it_u' (a nil value)
stack traceback:
        [C]: ?
        data/stats.lua:2051: in function 'assign_loot_Stat'
        data/stats.lua:2313: in function <data/stats.lua:2307>
 

Attachments

I think about that function where called by addEvent (Line 2404), I think that you prevent that problem by adding this line between 2050 and 2051:
Lua:
 if it_u == nil then return false end
123.png
The line 2051 will be pushed to line 2052. Hope this solve your trouble.
 
Solution
I don't see any mistakes but if it works for 2 hours I am trying to get something.

I will watch
 
Back
Top