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

"End Of File" a.k.a "eof" error - Please help!

Started by xXFregattXx, 03 July 2015 - 09:25 PM
xXFregattXx #1
Posted 03 July 2015 - 11:25 PM
Im in the process of making an operating system in ComputerCraft, i was going to make a login screen and then i got the error:

——————————————————-
bios:339: [string "login"] :9: '<eof>' expected
——————————————————-

I got very angry because i tried everyhing to fix it. i suspect there is something wrong
with the image for the login screen, the picture i drew is called lg, the root is: /os/login/lg



--Image
  _lg = paintutils.loadImage("/os/login/lg")
--functions
  clear = funtion()
	term.clear()
	term.setCursorPos(1, 1)
  end

  drawLogin = function()
	term.setBackgroundColor( colors.white )  
  end

  init = function()
	drawLogin()
  end
--Main

  init()
  clear()
  print("LOL")
Lyqyd #2
Posted 03 July 2015 - 11:37 PM
You've misspelled "function" for your clear function.
xXFregattXx #3
Posted 04 July 2015 - 12:24 PM
You've misspelled "function" for your clear function.

Yes, i noticed that right after i had posted it, but now the screen is just white, no picuture, have you got any tips on what i can do to fix it?
Luca_S #4
Posted 04 July 2015 - 02:30 PM
EOF(End of Lines) Errors often mean you have an end too much so if you get the problems in further programs, check if you have an end too much or if you misspelled if,function,while,for,…
Edited on 04 July 2015 - 12:30 PM
Lyqyd #5
Posted 04 July 2015 - 05:38 PM
The loadImage function in paintutils doesn't draw anything, and after you clear the screen (making it entirely white), you then draw to the screen with (presumably) white text. So, at this point, the program is doing exactly what you've told it to. You'd have to describe what you're trying to achieve instead of this for us to provide useful guidance.
xXFregattXx #6
Posted 04 July 2015 - 10:36 PM
The loadImage function in paintutils doesn't draw anything, and after you clear the screen (making it entirely white), you then draw to the screen with (presumably) white text. So, at this point, the program is doing exactly what you've told it to. You'd have to describe what you're trying to achieve instead of this for us to provide useful guidance.

Thank for the help, i found out that i didnt need to do a clear function after i have drawn the image