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

Cant figure it out :/

Started by auridas330, 30 September 2012 - 08:49 AM
auridas330 #1
Posted 30 September 2012 - 10:49 AM
Hey im trying to make the computer output a redstone current, just by launching a program
i tried
rs.output("right")
sleep 5
end
but i get an error, any suggestions?
Klausar #2
Posted 30 September 2012 - 11:00 AM
I believe the correct Syntax is

rs.setOutput("right")
sleep(5)

Try that. No need for end, since there is no loop etc.
auridas330 #3
Posted 30 September 2012 - 11:17 AM
still get the same error
bios206 string open = expected
fusiomax #4
Posted 30 September 2012 - 11:20 AM
the proper syntax is:
rs.setOutput("right", true)

Here's the wikipage for the rs api: http://computercraft.info/wiki/index.php?title=Redstone.setOutput
auridas330 #5
Posted 30 September 2012 - 11:21 AM
Still not working :)/>/>
Klausar #6
Posted 30 September 2012 - 11:23 AM
Oh sorry, completely forgot about ",true" :)/>/>

edit: Can you send us a screenshot of your sourcecode?
fusiomax #7
Posted 30 September 2012 - 11:24 AM
Still not working :)/>/>

Could you post the full code excerpt it would be much easier to find the errors if we had that (remember to use code tags)
auridas330 #8
Posted 30 September 2012 - 11:27 AM


Uploaded with ImageShack.us

Im trying to open the door with wireless redstone but its not outputting it
fusiomax #9
Posted 30 September 2012 - 11:29 AM
Im trying to open the door with wireless redstone but its not outputting it

for the sleep command it is sleep(5)
also if you just run that it will lock into an on state (door will remain open) you need to turn the redstone output off after the sleep period, for example: rs.setOutput("left", false)

EDIT: take a look at the CC wiki http://computercraft.info/wiki/index.php?title=ComputerCraft_Wiki_-_Home It helps a lot when tracking down errors
auridas330 #10
Posted 30 September 2012 - 11:30 AM
Lol i sorted it out forgot the () on 5