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

I can't find what's wrong with my program

Started by Deathmachine513, 27 August 2013 - 07:09 AM
Deathmachine513 #1
Posted 27 August 2013 - 09:09 AM
Title: I can't find what's wrong with my program.

I am trying to transfer data bettween computers using the length of redstone signals to build a string one letter at a time on the computer that is recieving the signal. My transfer program works fine but when I try to send something my redstonerecieve program gets stuck in it's recieve() function. I put in print()s to certain areas in the program and it only printed from the recieve() function. Also the count variable never got past 2 which is not supposed to happen. Maybe it's something with my while loop because I was never able to get them to work for some reason. I still have not been able to see what is wrong. Thanks in advance for your help.

http://pastebin.com/ZQjRd1np This is the one that doesn't work.
http://pastebin.com/9dnNmKAC This is it's companion program that does work.
Also if you are going to test it make sure it's a 6 letter word, I haven't added something for different length words.
Bubba #2
Posted 27 August 2013 - 10:28 AM
We will need to have your code in able to fix your code. Please put it up on pastebin for us to view it. Thanks.
Deathmachine513 #3
Posted 27 August 2013 - 12:46 PM
http://pastebin.com/ZQjRd1np
http://pastebin.com/9dnNmKAC
The first link is the problem the 2nd works fine.
TheOddByte #4
Posted 27 August 2013 - 02:37 PM
You have "bb" in the loop setting it to true all the time causing it to hang, Just move it down right after the end below it ;)/>
Deathmachine513 #5
Posted 27 August 2013 - 03:23 PM
Thanks, it turns out I was missing an end for one of my ifs which made the bb = true be part of my loop. But it's fixed now.