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

why is this nil

Started by prognamstyle, 18 October 2012 - 03:31 PM
prognamstyle #1
Posted 18 October 2012 - 05:31 PM
if redstone.getinput("left", true) == true then
print("left")
if redstone.getinput("right", true) == true then
print("right")
end
end
Noodle #2
Posted 18 October 2012 - 05:31 PM
redstone.getInput("left") == true

1. Input - Capital
2. you had wrong syntax.
3. Change the second if to elseif
Klausar #3
Posted 18 October 2012 - 05:32 PM
Wrong section, but you should replace the second "if" with "elseif" and remove one end.
prognamstyle #4
Posted 18 October 2012 - 05:47 PM
thanks i see wat i did wrong now. I was tying to make a game that you could contol without being in the computer