Posted 09 September 2012 - 05:42 PM
http://i.imgur.com/8OBkn.png
I've been trying all day to figure this one out, the goal of this particular program is to read in a value from the file userData, check it against the given value 1530, and, if it returns true, send a redstone signal out the back, then run a different program (This is part of a keycard setup I am making on my server)
I've tried the fs.open method shown on the left, the print value shows that it reads 1530 from userData, but that it still checks false against the value 1530.
I have tried this checking against "1530" as well, understanding that fs.readLine() returns a String, but it still checks false.
Is there a different command I should be using, or perhaps should I be doing this with the io.open method? Or is my logic just wrong altogether… any help is appreciated.
I've been trying all day to figure this one out, the goal of this particular program is to read in a value from the file userData, check it against the given value 1530, and, if it returns true, send a redstone signal out the back, then run a different program (This is part of a keycard setup I am making on my server)
I've tried the fs.open method shown on the left, the print value shows that it reads 1530 from userData, but that it still checks false against the value 1530.
I have tried this checking against "1530" as well, understanding that fs.readLine() returns a String, but it still checks false.
Is there a different command I should be using, or perhaps should I be doing this with the io.open method? Or is my logic just wrong altogether… any help is appreciated.