Posted 30 October 2012 - 01:48 PM
So I'm writing up some interesting doors for a friends "Secret Base" on our Multiplayer Tekkit server, and I've slowly ran into a brick wall. I've managed to get past multiple hindrances (through googling and this lovely site) around multiple outputs and such and I'm having issues using the Elseif statement.
I've got it so this door checks the label of the disk, and if it's "Furor" it outputs below (Wire leading to the door) and to the side (A green light that turns on). What he also wants is if you put in the wrong Floppy, it outputs to an Alarm, and to a Red light ontop.
The only way I could think of wiring this up is using this (Most of it is taken from a Youtube tutorial, that I've modified for my own means).
Now what I'm wondering, is if I use an "If" statement again, about if disk.getLabel == "Furor" is false (If this is the case, how would I write that?) or do I use an elseif in the same manner. I was using a else statement, but now I have a cycling flashing red light and alarm. My other question is, what does the "==" signify before the label?
Many thanks, Ogg
I've got it so this door checks the label of the disk, and if it's "Furor" it outputs below (Wire leading to the door) and to the side (A green light that turns on). What he also wants is if you put in the wrong Floppy, it outputs to an Alarm, and to a Red light ontop.
The only way I could think of wiring this up is using this (Most of it is taken from a Youtube tutorial, that I've modified for my own means).
while true do
if disk.getLabel("left") == "Furor" then
rs.setOutput("front", true)
rs.setOutput("bottom", true)
disk.eject("left")
sleep(5)
rs.setOutput("front", false)
rs.setOutput("bottom", false)
Now what I'm wondering, is if I use an "If" statement again, about if disk.getLabel == "Furor" is false (If this is the case, how would I write that?) or do I use an elseif in the same manner. I was using a else statement, but now I have a cycling flashing red light and alarm. My other question is, what does the "==" signify before the label?
Many thanks, Ogg