Hey there! So I'm trying to make a program that controls a bundled redstone cable, and opens a series of doors (For context I'm building a storage building with ten rooms - six Standard storage rooms ( S1 through S6 ), two Premium storage rooms (P1 and P2), a Utility room and the Office.
With that in mind I want to write a program where I pass an argument, have it check to see if it matches any of the doors in the list, and then opens that door, or throws an error if no match is found. For example:
"open s1" would open door S1, while "open foobar" would just return "That isn't a door."
You can post now and register later.
If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.
Hey there! So I'm trying to make a program that controls a bundled redstone cable, and opens a series of doors (For context I'm building a storage building with ten rooms - six Standard storage rooms ( S1 through S6 ), two Premium storage rooms (P1 and P2), a Utility room and the Office.
With that in mind I want to write a program where I pass an argument, have it check to see if it matches any of the doors in the list, and then opens that door, or throws an error if no match is found. For example:
"open s1" would open door S1, while "open foobar" would just return "That isn't a door."
Here's the code I have so far, on Pastebin.
Unfortunately I'm getting tripped up somewhere with this, and getting "Expected number, got string" errors. Any advice on this would be appreciated!
Link to post
Share on other sites