I’m having an issue with line 24. When I run it, I get an error saying that "attempt to get length of global ‘lines’ (a nil value). I’ve been lingering on this issue for a week and I haven’t been able to make any progress despite researching.
--Project 24 Handling Runtime Events \_W = display.viewableContentWidth \_H = display.viewableContentHeight local background = display.newRect(0,0, \_W, \_H) background:setFillColor(255,255,255) local oldX local oldY local line = {} local function draw(e) oldX = oldX or e.x oldY = oldY or e.y local line = display.newLine( oldX, oldY, e.x, e.y) line:setColor(0,0,0) line.width = 3 --Fluid line lines[#lines+1] = line; --Length of the lines table --Adding one add to the end of the line table a new line instance oldX = e.x oldY = e.y end Runtime:addEventListener("touch", draw)