Posted 25 June 2016 - 07:21 PM
So I'm trying to create and animate fire using random positions but I am getting some error
hope I'll get an answer that I'll understand because…. dafruq ;)/>
test.lua:5: bad argument #2: interval is empty
I've checked the code enough times and i dont get the problem…
function fire(x,y,height,spreadRad,frames,nLines,colors_back)
for a = 1,frames do
for e = 1,nLines do
g = math.random(x-1,x-spreadRad)
j = math.random(y-1,y-height)
paintutils.drawLine(x,y,g,j,colors.red)
end
sleep(0.003)
term.setBackgroundColor(colors_back)
term.clear()
end
end
fire(35,19,5,5,13,6,colors.black)
hope I'll get an answer that I'll understand because…. dafruq ;)/>
Edited on 26 June 2016 - 03:09 PM