This is a read-only snapshot of the ComputerCraft forums, taken in April 2020.
spiderpim's profile picture

how to solve this error?

Started by spiderpim, 28 December 2013 - 12:17 PM
spiderpim #1
Posted 28 December 2013 - 01:17 PM
this is my first program:

while true do
print("true or false")
term.write(">")
local b = io.read()
print("which side")
term.write(">")
local a = io.read()
redstone.setOutput("a", B)/>
I cant see what is wrong with this
can nayone help me?
I made no screenshots
for testing I did false, then left
Lyqyd #2
Posted 28 December 2013 - 03:48 PM
The string false isn't equivalent to the boolean false. You could change it to this to make it a boolean:


local b = read() == "true"
Nom #3
Posted 28 December 2013 - 03:54 PM
I prefer not to use io.read and io.write.
spiderpim #4
Posted 29 December 2013 - 02:21 PM
thanx for helping me. I am just a beginner, you see?
aaa #5
Posted 30 December 2013 - 06:32 PM
+1 for the epic topic title

1.read the sticky
2.read carefully your code : 'a', 'A' and ' "a" ' ared three different things.