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

[Solved] FTB (Mindcrack) Train system Help

Started by furrball25, 17 February 2013 - 01:25 PM
furrball25 #1
Posted 17 February 2013 - 02:25 PM
Title: FTB (Mindcrack) Train system Help
Today I began a project that i soon realized was a little bit over my programming ability. I started to create a train system that was client and server based. At each station there would be a set of buttons to select your destination. The buttons are hooked up to a colored cable, that runs to a bundled cable, then to the back of a computer. In the end, I hope to send a rednet signal from one Client computer, to the server that contains 2 digits. The first one would be the code for what station, and the second one would be the destination. Then the server will change the switch tracks accordingly, via more bundled cable.I wrote the begining of the program, and now it keeps crashing so can someone review my code and tell me why?
The programs name is Sender, and this is the error I keep getting: sender :6; Expected string, number
here is the code:


print("Sender Client Running")
rednet.open("top")
white = rs.testBundledInput("back", colors.white)
gray = rs.testBundledInput("back", colors.grey)
yellow = rs.testBundledInput("back", colors.yellow)

while true do
sleep(.1)
  if white == true then
	print("White")
  end

  if gray == true then
	print("Gray")
  end

  if yellow == true then
	print("Yellow")
  end
end
diegodan1893 #2
Posted 18 February 2013 - 06:50 AM
Change:

gray = rs.testBundledInput("back", colors.grey)
to:

gray = rs.testBundledInput("back", colors.gray)

It's colors.gray or colours.grey.
furrball25 #3
Posted 19 February 2013 - 08:39 AM
Ohhhhh…. Wow thanks… Cant believe that I didn't see it…