HELP ME broken myblocks

Discussion specific to NXT-G, NXC, NBC, RobotC, Lejos, and more.
Post Reply
theniels17
Posts: 1
Joined: 22 Aug 2011, 14:32

HELP ME broken myblocks

Post by theniels17 »

who could help me

i´ve made a program for my nxt but there are broken my blocks and i can´t fix them
what should i do :?:
haydenstudios
Posts: 252
Joined: 22 Oct 2010, 20:05
Location: The United States of America
Contact:

Re: HELP ME broken myblocks

Post by haydenstudios »

There are two main ways that a MyBlock can break. The more simple way is if the MyBlock cannot be found. For example: if there is a MyBlock that rotates a motor four times, and is called, "4 rotations". But then someone changes it to do five rotations, and then goes into the MyBlock directory and renames it, "5 rotations". Then, the main program is looking for a MyBlock called, "4 rotations", but it doesn't find it. And you see a broken MyBlock in the program. Try to rule out the possibility that this is happening to you. If, however, that's the case, then the solution is rather simple. First, delete the broken MyBlock from your current program. Next, open your MyBlock pallette, and locate your similar MyBlock with its slightly different file name, and drag it in the place of your previously broken MyBlock, and the problem will be solved. If this is not the case, then you are probably aware that the MyBlock broke because it got too big, and your computer could barely handle it, and you did something weird with it, and then it just kinda.... broke. If this is the case, then you have your work cut out for you. Unfortunately, there is no official way to effectively fix this kind of broken MyBlock, like a MyBlock-repair tool. The best you can do is start a new program in a new tab, copy the contents of your broken MyBlock, paste them into your new program, select them, and insert them into a new MyBlock. Hold your horses though, cause I was talking about if your MyBlock contains no loops, switch blocks, or connected data wires. Because if it does, then performing the above instructions will not likely fix this. If your MyBlock contains the aformentioned sophistications, then repairing it will be much more tedious. You can copy and past all the regular blocks like before, but loops, data wires, and most especially switches will need to be reinserted manually. If you do this right, then you'll have your MyBlock back. Now that you have your MyBlock back, be careful, save often, and also save backups in another directory just incase it breaks again, and you'll be able to continue working without having to repair it again. Why is it dangerous to paste loops, switches, (more often switches) and wires into this new MyBlock? You could probably figure this out easily by trying yourself, but I'll go ahead and explian. Pasting a loop or switch from somewhere else is likely to cause stray beams to develop when moved from its pasted location. These stray beams are very hard to get rid of, and immediately breaks any MyBlock it's in, and prevents it from being able to even compile and be downloaded onto the NXT. As for data wires, it is hard to copy and paste them, because they break often when pasting. Sometimes you can pull it off, but I don't recommend it. I recommend going to your current MyBlock, noting the connections of your wired area, disconnecting all the wires, copying the blocks, pasting them into your new block, and reconnecting the wires. I hope that this explanation was of help to you, and that you will be able to do some MyBlock repairing.
-Hayden
Post Reply

Who is online

Users browsing this forum: No registered users and 7 guests