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

[Question] Simple Status Screen

Started by Marekone, 17 August 2012 - 08:46 PM
Marekone #1
Posted 17 August 2012 - 10:46 PM
I try to make a status screen for my factory.
The screen show the the status of the machines (True or False)

here is my code
Whats wrong ?


while true do
if rs.testBundledInput("back",colors.orange) == false
then print("Massfabrikator: False")
elseif rs.testBundledInput("back",colors.orange) == true
then print("Massfabrikator: True")
sleep(5)
end




Sorry for my bad English…
Cranium #2
Posted 17 August 2012 - 11:01 PM
What is it doing that it shouldn't?
Marekone #3
Posted 17 August 2012 - 11:06 PM
when I run the code, nothing happens.
Marekone #4
Posted 17 August 2012 - 11:19 PM
got it :(/>/>

double "end"


while true do
if rs.testBundledInput("back",colors.orange) == false
then print("Massfabrikator: False")
elseif rs.testBundledInput("back",colors.orange) == true
then print("Massfabrikator: True")
sleep(5)
end
end
Cranium #5
Posted 17 August 2012 - 11:25 PM
Wow, can't beleive I didn't see that. Did it not give you an error? It should have said error: 'end' expected (to close if at line 2)
Marekone #6
Posted 17 August 2012 - 11:58 PM
it say: 26 !? :(/>/>
i have restart minecraft and saw my mistake… i correct the code and it works :)/>/>