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:
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