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

Problem with Bundled Output command

Started by PinkSnail, 24 March 2013 - 04:05 PM
PinkSnail #1
Posted 24 March 2013 - 05:05 PM
I am trying to use this program to control a Mob Spawner and have tried for the past 2 days to get it to work but it hasn't.
The script starts by listing the available mob options to start spawning and then reads the user input to control that mob spawn. The computer should charge a cable in a bundled cable, which is then inverted, to allow a mob spawner to start spawning mobs.For some reason however the computer will not output a charge on the bundled cable. Here is my script:


term.clear()
print("[1] Skeletons ")
print("[2] Blazes ")
print("[3] Angry Zombies ")
print("[4] Restart")
Input = read()
if Input == "1" then
term.clear()
rs.setBundledOutput("back", colours.white)
elseif Input == "2" then
term.clear()
rs.setBundledOutput("back", colours.blue)
elseif Input == "3" then
term.clear()
rs.setBundledOutput("back", colours.red
term.clear()
elseif Input == "4" then
os.shutdown()
end

Any ideas?

Skeletons > White
Blazes > Blue
Zombies > Red

I'm using computer craft in the new FTB Ultimate pack.
Altair357 #2
Posted 24 March 2013 - 05:22 PM
I tried out your script. The only issue is that there's a missing ) on line 16. I added that, and now everything works perfectly.

In the future, though, try to read error messages before submitting problems. It stated pretty clearly that it expected a ) on line 16.