E
exos9
Guest
So I typed a quick program to test some functions in my OS and when creating an "Exit" button I came across something weird... I'm still learning but I find this weird:
term.setBackgroundColor(2048)
term.setTextColor(1)
term.clear()
term.setCursorPos(12,1)
print("Welcome to the file manager")
term.setCursorPos(5,2)
print("Here are the commands you can enter:")
shell.run("help")
term.setCursorPos(20,13)
shell.run("ls")
term.setCursorPos(23,19)
print("Exit")
if X>=23 and X<=28 and Y=18 and button == 1 then
shell.run("gui")
end
When I try to run it I get the error : bios:339: [string "filemanager"]:13: 'then' expected
I'm stumped.. Could anyone help me? Bear in mind I'm not that good at coding yet
term.setBackgroundColor(2048)
term.setTextColor(1)
term.clear()
term.setCursorPos(12,1)
print("Welcome to the file manager")
term.setCursorPos(5,2)
print("Here are the commands you can enter:")
shell.run("help")
term.setCursorPos(20,13)
shell.run("ls")
term.setCursorPos(23,19)
print("Exit")
if X>=23 and X<=28 and Y=18 and button == 1 then
shell.run("gui")
end
When I try to run it I get the error : bios:339: [string "filemanager"]:13: 'then' expected
I'm stumped.. Could anyone help me? Bear in mind I'm not that good at coding yet