Hello,
I was playing around with function and to see if I could use my function in a for-loop. But I dont understand why my code not is working. The program is drawing the first line. But then it stops.
//Magnus
[code]
display.setStatusBar(display.HiddenStatusBar)
local _H=display.contentHeight;
local _W=display.contentWidth;
local function draw_line(x1,y1,x2,y2,w)
draw_line=display.newLine(x1,y1,x2,y2);
draw_line.width=w;
end
local i;
for i = 10, 100, 5 do
draw_line(0,i,_W,_H,3);
end
[/code] [import]uid: 146882 topic_id: 26300 reply_id: 326300[/import]