Log In  

draw= function {
line(10,10,10,10);

};

P#76915 2020-05-19 17:43 ( Edited 2020-05-19 17:46)

plz help i do not no how to even get a pixel on the screen and no things i can find to help

P#76917 2020-05-19 17:44

Three things:

1) The name of the _draw function must start with an underscore.

2) your code draws a line from point (10,10) to point (10,10) -- the same point. That will only draw a single pixel.

3) your code does not clear the screen before drawing, so that single pixel could be drawn onto some text that is already onscreen and so not be noticeable.

Here's a version that clears the screen and draws a longer line, from the top-left to bottom-right corner of the screen.

_draw = function()
 cls()
 line(0,0, 127,127)
end
P#76927 2020-05-19 22:13 ( Edited 2020-05-19 22:14)

[Please log in to post a comment]

Follow Lexaloffle:          
Generated 2024-04-19 10:19:42 | 0.006s | Q:14