r/ComputerCraft • • Jan 31 '21

<'eof'> error need help

Im building a program where i can control my IC2 reactor and itll output information to monitors currently I'm trying to get it to just start the reactor but im getting an end of file error and im new to Lua and i can't quite figure out what is causing this any help is appreciated here is my Pastebin

1 Upvotes

6 comments sorted by

View all comments

2

u/SadieWopen Feb 01 '21 edited Feb 01 '21

Line 29, 35 and 42 are your problems. on line 26 you start an 'if' block, line 29 you 'end' it and line 31 you 'else if' it, which doesn't work. I think elseif is meant to be one word too.

1

u/Drunkmonkey1186 Feb 01 '21

ok that may be my problem i had removed those end's before after looking up how if statements were used but i did not change my else if's

2

u/SadieWopen Feb 01 '21

The other problem is that most of this code won't do anything. I would suggest trying these things out in the console of the computer, line by line, so you can see what they do (this is a great way to check your understanding of the language.