Jump to content




help please


  • You cannot reply to this topic
5 replies to this topic

#1 joshgreat

  • Members
  • 33 posts

Posted 16 September 2016 - 06:44 PM

please help i get bios.lua:14: [string ".temp"]:43: '<eof>' expected
from this code
http://pastebin.com/G8PS1gP8

SOLVED
thx guys

Edited by joshgreat, 17 September 2016 - 08:25 AM.


#2 KingofGamesYami

  • Members
  • 3,002 posts
  • LocationUnited States of America

Posted 16 September 2016 - 09:08 PM

'elseif' is all one word in Lua. A properly formatted elseif would look like this:
if a then
  doa()
elseif b then
  dob()
end

The error in question occurs when too many 'end's are typed. Removing an end should fix the error, but you should also fix the format I described above.

#3 supernicejohn

  • Members
  • 98 posts
  • LocationSweden

Posted 16 September 2016 - 09:09 PM

Hello and welcome to the forums! As no pros are around right now, I'll help you out!

First, the <eof> stands for end of file, and it is expecting that; which in turn means that any code after that line would not be run, which is causing problems. Usually this is because one or more too many "end"s. Deleting one usually solves the problem, but not always.

Second, when writing "else if" I assume you meant to write "elseif" (languages do differ in minor things like that, it'll catch anyone out!), and swapping the "else if"s for "elseif"s seems to have solved most of the problems. < That in turn means you'll have to remove some "end"s to avoid more <eof>s.

Third, I see that you can use shell.run(), you just forgot to in some places ;)

After that, it (during my testings) is fully functional! I'd recommend the next thing you learn is "os.pullEvent()" to do away with the read() functions, which would make this program look much better! For designing other programs it is also good to know tables, but this is a nice project!

I'm posting a (hopefully) bug free program, but I recommend you try to solve the above problems yourself ;)
Hello pros. am I allowed to help here? =D

Edit: 1 minute late =P[

Edited by supernicejohn, 16 September 2016 - 09:10 PM.


#4 Lupus590

  • Members
  • 2,028 posts
  • LocationUK

Posted 16 September 2016 - 10:20 PM

View Postsupernicejohn, on 16 September 2016 - 09:09 PM, said:

Hello and welcome to the forums! As no pros are around right now, I'll help you out!
Hello pros. am I allowed to help here? =D
There isn't really a formal group of pro's on the forums, this subforum is more of a peer assitance area. If you thing you can answer the question then by all means have a go.

Edited by Lupus590, 16 September 2016 - 10:21 PM.


#5 supernicejohn

  • Members
  • 98 posts
  • LocationSweden

Posted 16 September 2016 - 10:26 PM

View PostLupus590, on 16 September 2016 - 10:20 PM, said:

View Postsupernicejohn, on 16 September 2016 - 09:09 PM, said:

Hello and welcome to the forums! As no pros are around right now, I'll help you out!
Hello pros. am I allowed to help here? =D
There isn't really a formal group of pro's on the forums, this subforum is more of a peer assitance area. If you thing you can answer the question then by all means have a go.
Second line is more of a joke =P, but i do mean the first one hehe.

#6 joshgreat

  • Members
  • 33 posts

Posted 17 September 2016 - 08:14 AM

Thanks Sooooooo much guys i really am happy, you know what? my OS will go public when its done :D





1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users