This is a read-only snapshot of the ComputerCraft forums, taken in April 2020.
FredoBeer's profile picture

It keeps saying bios:339: [string "ferdi"] :12: "then" expected

Started by FredoBeer, 15 October 2017 - 02:45 PM
FredoBeer #1
Posted 15 October 2017 - 04:45 PM
I have 3 monitors on the bottom of the computer

local pos = 10

mon = peripheral .wrap("bottom")
mon.clear()
mon.setTextscale(5)
mon.setBackgroundColor(32)
mon.setTextcolor(32568)

while true do

if pos == -19
pos = 10
end

mon.clear()
mon.setCursorPos(pos.1)
mon.write("FredoBeers House")
pos == pos - 1

os.sleep(0.15)

end

I am still a noob in computercraft but i still don't know what i have done wrong?
I hope you guys can help me.
Bomb Bloke #2
Posted 16 October 2017 - 04:06 AM
if pos == -19

"if" statements require a corresponding "then" statement after their condition: http://lua-users.org/wiki/ControlStructureTutorial

You've also got a period in your setCursorPos arguments list (you need a comma), and "setTextcolor" needs to be changed to "setTextColor".
Exerro #3
Posted 18 October 2017 - 05:18 PM
Also use "setTextScale" not "setTextscale".