Posted 10 July 2012 - 11:30 PM
Hey, so, I have a problem with my simple keycard program. I've tried many things but can't figure out what I'm missing on line 3. Here's my code.
-Thanks, Ra.
EDIT: Problem fixed! Thread may be closed now :)/>/>
print("Enter Room Key.")
if (disk.isPresent(driveSide) ) then
check.label(driveSide,"bottom")
if (label == "roomkey4d5") then
redstone.setOutput("left",true)
print("Welcome Home.")
else
print("Invalid Room Key.")
end
else
print("Room Key Not Detected.")
end
Line 3, which is "check.label(driveSide,"bottom") is almost undoubtedly code that I have written wrongly (This is my first LUA test). What it's supposed to do is check what the name of the key card is, and if it's "roomkey4d5", go to line 5; else, go to line 8. But I'm apparently missing something.-Thanks, Ra.
EDIT: Problem fixed! Thread may be closed now :)/>/>