Posted 25 November 2012 - 01:58 AM
hey guys, i was playing with computercraft a bit on a server with a few friends and i need some help…i wanted
to create a user interface for, by means of wireless redstone, turning my machines (quarries, automatic farms etc.) on
and off from a central terminal in my home. Now, when booting the computer it asks for a password and if entered incorrectly 3 times,
the computer shuts down, if its correct you get to the main menu. you have a few options in a list and in the bottom line
you can type in what section you want to go to. that works fine as well, and if you for example go to the quarries section, it tells you which quarries are on and which are off. you can turn them on or off by typing "turn quarry 1 on" for example, and the white wire in the bundled cable lights up and starts the quarry. i have set the UI to then return to the home screen, but when i go to the quarry section again, it still tells me that quarry 1 is off. so basically i need help with coding that the computer reads the BUNDLED input and if a certain color combination is on, it should print the correct UI page. i have tried it with
-if redstone.getBundledInput("back") == "1" then
-if redstone.getBundledOutput("back") == "1" then
-if redstone.getBundledInput("back", 1) == "true" then
-if redstone.getBundledOutput("back", 1) == "true" then
and i have set it so that if none of the combinations (1,2,3 or 0) is true, it should print a page of the interface saying "could not retrieve data" and it always puts that, meaning that the code is incorrect…so guys please if anybody knows how to put bundled cables into an "if" command please help me, i can also post the whole code if someone wanted me to, its like 260 lines though
to create a user interface for, by means of wireless redstone, turning my machines (quarries, automatic farms etc.) on
and off from a central terminal in my home. Now, when booting the computer it asks for a password and if entered incorrectly 3 times,
the computer shuts down, if its correct you get to the main menu. you have a few options in a list and in the bottom line
you can type in what section you want to go to. that works fine as well, and if you for example go to the quarries section, it tells you which quarries are on and which are off. you can turn them on or off by typing "turn quarry 1 on" for example, and the white wire in the bundled cable lights up and starts the quarry. i have set the UI to then return to the home screen, but when i go to the quarry section again, it still tells me that quarry 1 is off. so basically i need help with coding that the computer reads the BUNDLED input and if a certain color combination is on, it should print the correct UI page. i have tried it with
-if redstone.getBundledInput("back") == "1" then
-if redstone.getBundledOutput("back") == "1" then
-if redstone.getBundledInput("back", 1) == "true" then
-if redstone.getBundledOutput("back", 1) == "true" then
and i have set it so that if none of the combinations (1,2,3 or 0) is true, it should print a page of the interface saying "could not retrieve data" and it always puts that, meaning that the code is incorrect…so guys please if anybody knows how to put bundled cables into an "if" command please help me, i can also post the whole code if someone wanted me to, its like 260 lines though