Wood14Mine 0 Posted April 6, 2017 Share Posted April 6, 2017 Hey! I've programmed a ticket system for a train station so I have to make an if query... ..but this if query doesn't work.... [Note: I will check if the redstone signal on the bottom of the computer turned on.] !! Important: No error is displayed !! So whats wrong with my code? Can you help me? local sides = require("sides") local component = require("component") local rs = component.redstone ## Code here while true do if rs.getOutput(sides.bottom, 15) == true then ## Code here end end Thanks in advance! - Wood14Mine Quote Link to post Share on other sites
0 Molinko 43 Posted April 6, 2017 Share Posted April 6, 2017 Replace getOutput with getInput. getOutput checks if the computer itself is outputting a rs signal. Quote Link to post Share on other sites
0 Gorzoid 10 Posted April 7, 2017 Share Posted April 7, 2017 getInput also returns a number not a boolean check if it is > 0 Quote Link to post Share on other sites
0 Wood14Mine 0 Posted April 7, 2017 Author Share Posted April 7, 2017 It's now working! Thank you very much! Quote Link to post Share on other sites
Hey!
I've programmed a ticket system for a train station so I have to make an if query...
..but this if query doesn't work....
[Note: I will check if the redstone signal on the bottom of the computer turned on.]
!! Important: No error is displayed !!
So whats wrong with my code?
Can you help me?
Thanks in advance!
- Wood14Mine
Link to post
Share on other sites