This code not working:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
function around_damagewe(id,x,y,size,dmg)
for _,eid in pairs(player(0,"tableliving")) do
parse("explosion "..x.." "..y.." "..size.." "..dmg.." "..id)
if math.sqrt((player(eid,"x")-x)^2+(player(eid,"y")-y)^2) <= size then
heroes_hit(eid, id, 1, dmg)
end
end
end
function spunkw(id,x,y,dmg)
local spunkw = image("gfx/heroes/skills/firecircles_p.png",x,y,0)
imagecolor(spunkw,0,0,255)
imagealpha(spunkw,0.7)
local spunkws = image("gfx/heroes/skills/firecircle_p.png",x,y,0)
imagealpha(spunkws,0.7)
tween_scale(spunkws,500,0.1,0.1)
timer(500,"freeimage",spunkws)
timer(500,"freeimage",spunkw)
local ids, xs, ys, dmgs = id, x, y, dmg
timer(500,"around_damagewe","ids,xs,ys,64,dmgs")
end
ERROR:
1
LUA ERROR: sys/lua/skills.lua:67: attempt to concatenate local 'dmg' (a nil value)
Error line:
1
parse("explosion "..x.." "..y.." "..size.." "..dmg.." "..id)
Thanks.