local rs = component.proxy(component.list(“redstone”)())
Local wr = component.proxy(component.list(“modem”)()) --[[
^ capital letter not allowed! Use 'local' ]]
local x,w,a,d,f,sent = computer.pullSignal()
#output to front --[[
^ this is a shell comment - lua will try (and fail) to parse this!
Learn about Lua comments here: https://www.lua.org/pil/1.3.html ]]
while true do
if sent = “enon” then --[[
^ here you've missed the distinction between '=' and '=='.
While '=' is an assignment operator (such as "local a = 4") then '==' is an equality expression (such as "if sent == 'enon'")
The distinction is made to prevent you from accidentally doing one when you meant the other. ]]
elseif sent = “enoff” then --[[
^ don't forget to fix this one too ]]
elseif computer.energy() < 150 then
^ you were missing an 'end' here but it was hard to tell until I added indentation.
Giving the program some shape makes it easier to spot grammatical mistakes like these ]]
-- I've also removed a lot of the whitespace between each of your lines of code. Bringing it closer together makes it easier to comprehend.
I've taken your code, changed the whitespace a little and annotated it with all the mistakes I spotted.
Hopefully you'll be able to fix up the code yourself!
Also something to beware when pasting code raw - the forum exchanges some symbols to make them more aesthetically pleasing, but this breaks your code - use the "code" button in the editor instead!
Hope this helps
Hey guys, a couple of years ago I created a few episodes of playing minecraft using only OpenComputers, I started doing that again and here is the first episode.
In the OpenComputers Challenge we are not allowed to leave the house, but we have a robot companion that can do our deeds for us.
Let me know what you think, I'd appreciate any feedback.