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

36: '=' expected

Started by combatxarms12, 08 September 2012 - 05:20 PM
combatxarms12 #1
Posted 08 September 2012 - 07:20 PM
Please some one help me i tried a lots of things, but every time and error :/


local count = 0
local hMonitor = peripheral.wrap("top")
term.redirect(hMonitor)
print"  ---------------------------------------------- "
print" |											  |"
print" |											  |"
print" |											  |"
print" |											  |"
print" |											  |"
print" |											  |"
print" |											  |"
print" |											  |"
print" |											  |"
print" |											  |"
print" |											  |"
print" |											  |"
print" |											  |"
print" |											  |"
print" |											  |"
print"  ---------------------------------------------- "
while true do
  event = os.pullEvent()

if colors.test(rs.getBundledInput("back"), colors.white) == true then
  rs.setOutput("right", true)
  sleep(2)
  os.reboot()
end
if colors.test(rs.getBundledInput("back"), colors.red) == true then
  count = count + 1
  term.clear
  term.setCursorPos(2,2)
  print("Pulses"..count)
end
end
sjele #2
Posted 08 September 2012 - 07:21 PM

local count = 0
local hMonitor = peripheral.wrap("top")
term.redirect(hMonitor)
print"  ---------------------------------------------- "
print" |																						  |"
print" |																						  |"
print" |																						  |"
print" |																						  |"
print" |																						  |"
print" |																						  |"
print" |																						  |"
print" |																						  |"
print" |																						  |"
print" |																						  |"
print" |																						  |"
print" |																						  |"
print" |																						  |"
print" |																						  |"
print" |																						  |"
print"  ---------------------------------------------- "
while true do
  event = os.pullEvent()
if colors.test(rs.getBundledInput("back"), colors.white) == true then
  rs.setOutput("right", true)
  sleep(2)
  os.reboot()
end
if colors.test(rs.getBundledInput("back"), colors.red) == true then
  count = count + 1
  term.clear() --You forgot ()'s here I fixed it tho
  term.setCursorPos(2,2)
  print("Pulses"..count)
end
end

Fixed I did tell what error was in code