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

redstone helo

Started by djhackerr, 16 May 2012 - 04:43 PM
djhackerr #1
Posted 16 May 2012 - 06:43 PM
edit—-
redstone help *


i still dont get it
i tried if rs.getOutput("back", false) then
–my code
else
end

but it doesnt do anything but skips check
how to set actions if false?

thanks
MysticT #2
Posted 16 May 2012 - 06:47 PM
Try with:

if not rs.getOutput("back") then
  -- your code
end
rs.getOutput("side") returns a boolean, you can check if that's true or false like:

if rs.getOutput("back") == true then
end
if rs.getOutput("left") == false then
end
or

if rs.getOutput("back") then
end
if not rs.getOutput("left") then
end
djhackerr #3
Posted 16 May 2012 - 06:49 PM
so i missed == false
thanks :P/>/>