redstone.setBundledOutput("bottom", 0)
Whenever I call this line, I get the error message "attempt to index ? (a boolean value)"But I use this exact same line at other places in the code.
Does anyone know what's wrong?
redstone.setBundledOutput("bottom", 0)
Whenever I call this line, I get the error message "attempt to index ? (a boolean value)"
rs.setBundledOutput("bottom", false)
Instead of "redstone" it save space this way.rs.setBundledOutput("top",colours.red) --top,red
rs.setBundledOutput("bottom",1) --bottom,white
Heh, insanity is the only thing that keeps me sane..^
Lol I didn't know there was a thing called "rs.setBundledOutpot()"
</joke>
Not necessarily. The error message often gets the line wrong. Besides, there is absolutely nothing wrong with the line he posted. He's not using rs.setOutput(), he's using rs.setBundledOutput(). Therefore, it doesn't work the same way and the second parameter is not a bool, it's an int. If you don't believe me, check the wiki. The only way that line could be throwing an error is if he doesn't have a bundled cable connected to the bottom of his computer.^
If the error says that that line is wrong, that line is wrong, so you don't need the rest of his code. Also (since I don't use redstone that much with computers) you still need to either say its true or false, theres no way around that.
Error messages never get the line wrong. This isn't C++. Also the computer doesn't care whether or not there is a bundled cable attached, it just 'outputs' it in any case.Not necessarily. The error message often gets the line wrong. Besides, there is absolutely nothing wrong with the line he posted. He's not using rs.setOutput(), he's using rs.setBundledOutput(). Therefore, it doesn't work the same way and the second parameter is not a bool, it's an int. If you don't believe me, check the wiki. The only way that line could be throwing an error is if he doesn't have a bundled cable connected to the bottom of his computer.
Thirdly, OP, we do need to see the rest of your code, the reason that it works in other places and not there is because at some point after using it you have overridden the redstone api table with a boolean, so then when you do redstone.setBundledOutput('bottom', 0) you are trying to index a boolean, i.e. you are trying to call the function 'setBundledOutput' on a boolean stored in a variable called 'redstone'.-snip-
Ah, music to my ears ^_^/>Error messages never get the line wrong. This isn't C++. Also the computer doesn't care whether or not there is a bundled cable attached, it just 'outputs' it in any case.
Secondly, rs.setBundledOutput must have a number as the second argument
Thirdly, OP, we do need to see the rest of your code, the reason that it works in other places and not there is because at some point after using it you have overridden the redstone api table with a boolean, so then when you do redstone.setBundledOutput('bottom', 0) you are trying to index a boolean, i.e. you are trying to call the function 'setBundledOutput' on a boolean stored in a variable called 'redstone'.
I've seen error messages (in Lua (in ComputerCraft)) point to blank lines before.Error messages never get the line wrong. This isn't C++.Not necessarily. The error message often gets the line wrong. Besides, there is absolutely nothing wrong with the line he posted. He's not using rs.setOutput(), he's using rs.setBundledOutput(). Therefore, it doesn't work the same way and the second parameter is not a bool, it's an int. If you don't believe me, check the wiki. The only way that line could be throwing an error is if he doesn't have a bundled cable connected to the bottom of his computer.
That is because of these 2 reasonsI've seen error messages (in Lua (in ComputerCraft)) point to blank lines before.