8 posts
Location
Russia
Posted 18 July 2015 - 03:46 PM
When I try to run the program, I get an error
bios:14: [string "weator.app"]:16: 'do' expected
How I can fix it?
The code is here
http://pastebin.com/9Z21T5d4
3057 posts
Location
United States of America
Posted 18 July 2015 - 05:57 PM
for i=1, xSize n do --#line 16
paintutils.drawPixel(i,1,colors.lightBlue)
end
Either you meant to do this:
for i = 1, xSizen do
or this:
for i = 1, xSize, n do
8 posts
Location
Russia
Posted 19 July 2015 - 06:33 AM
656 posts
Posted 19 July 2015 - 09:44 AM
You never defined the n you use in the for loop on that line. What do you expect it to do?
8543 posts
Posted 19 July 2015 - 09:49 AM
xSize is never defined either.
7083 posts
Location
Tasmania (AU)
Posted 19 July 2015 - 10:24 AM
Let's just assume that this loop:
for i=1, xSize n do
paintutils.drawPixel(i,1,colors.lightBlue)
end
… is supposed to turn the first line light blue. It'd be easier to just do this instead:
term.setCursorPos(1,1)
term.setBackgroundColour(colours.lightBlue)
term.clearLine()
If you wanted to turn the whole screen light blue, it'd just be:
term.setBackgroundColour(colours.lightBlue)
term.clear()
8 posts
Location
Russia
Posted 19 July 2015 - 01:07 PM
Let's just assume that this loop:
for i=1, xSize n do
paintutils.drawPixel(i,1,colors.lightBlue)
end
… is supposed to turn the first line light blue. It'd be easier to just do this instead:
term.setCursorPos(1,1)
term.setBackgroundColour(colours.lightBlue)
term.clearLine()
If you wanted to turn the whole screen light blue, it'd just be:
term.setBackgroundColour(colours.lightBlue)
term.clear()
Thanks, it does work