Quantcast
Channel: OTLand
Viewing all articles
Browse latest Browse all 32043

bad argument #2 to 'random' (interval is empty)

$
0
0
Hello, I have the following problem:
Lua:
Lua Script Error: [CreatureScript Interface]
data/creaturescripts/scripts/stats.lua:onHealthChange
data/stats.lua:1573: bad argument #2 to 'random' (interval is empty)
I paste the script below, maybe you can see the solution. (from 1573)
Code:
local hp_d = math.random(1, math.floor(math.random(0, tonumber(cur_slots[i][2]))))
if hp_d > 0 then
doTargetCombatHealth(aid, cid, COMBAT_LIFEDRAIN, -hp_d, -hp_d, CONST_ME_MAGIC_RED)...
bad argument #2 to 'random' (interval is empty)

Viewing all articles
Browse latest Browse all 32043

Trending Articles