r/ComputerCraft • u/Drunkmonkey1186 • 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
1
u/SadieWopen Feb 01 '21
https://pastebin.com/Y7XBnXYs
Here is what I came up with. Notable changes from your version. Peripheral wraps give you access to the functions that the peripheral offers, you need to assign them to a variable.
Although you had your check for correct password in the code, it was never going to count up to 3 because that block of code only ran once.
I added a temperature check into the monitor loop so that the computer can actually react to an overheating situation. Before it would only not turn on if the temperature was too high. Now, not only will it turn the reactor off when the temperature gets up there, but when it comes down again it will turn it back on.