Main Menu

Help with code

Started by Pechu317, Aug 13, 2020, 08:11 PM

Previous topic - Next topic

Pechu317

I have the following code:
(these first 3 lines would be in the picture but the screen wasnt big enough to show them)
term.setBackgroundColor(colors.red)
term.clear()
term.setCursorPos(1,1)

and it seems to me that everything is right, but when i run it, the computer returns the error:
bios.lua:26: [string ".temp"]:21: 'end' expected (to close 'while' at line 12)

but as you can see, there is clearly an "end" on line 21. Why am i getting this error?

Lupus590

pastebin put fileName and linking it is a better way to show your code on the forums.

else if is not the same as elseifone requires a extra end the other doesn't

QuickMuffin8782

Quote from: Pechu317 on Aug 13, 2020, 08:11 PM-snip-
For beginners like you, try taking this manual to begin coding on lua, so you can start learning how to code like us!
"The Blue Blur" - Working on Net Star OS, a new frontier for Red Star OS 3.0
linktr.ee/quickmuffin8782