Got a problem? Check your Code.
Bottomline: Your code has to be 100% correct. You can not have even one dash in the wrong place. More details, examples and tips below:
So, if you’re like me, you don’t know anything about this stuff. So you may spend hours googling and doing tutorials over and over again just because you’re ignorant.
Luckily, I’m home for Christmas and my dad is a database administrator. So he probably heard me recording my last, pathetic video and decided to pop into my room.
Here is a photo of the error I was getting:
Since I’m almost completely blind doing this, I was troubleshooting this error message the only way I knew how, which was copy pasting it into google. But it was specific, and I wasn’t getting any answers and didn’t understand why.
My dad looked at it for 2 seconds and was able to fix it and he doesn’t even use C#. He explained that you have to have identical code. So he held up the tutorial screen from the Roll The Ball tutorial and compared it to my code:
My code:
Tutorial:
If you are the type of person to pay good attention to detail, you may notice that these are not identical. If you’re like me, you may look at these and think, “meh, close enough.”
If you continue to be like me, you will not ever roll you’re dumb ball over your lousy plane. So I’m sorry to say this, but if we plan to learn Unity, we have no choice but to pay better attention to detail.
Here is the discrepancy:
Me:
Tutorial:
These two brackets could have forced me to start the entire tutorial over just out of ignorance.
There were clues there though, that if I had known better, could have saved me time. Here are a couple ways to tell if you have bad code:
RED ZIG ZAG UNDERLINE!
When there was an error, part of the code had a red zig zag underline, similar to when you spell something wrong. This indicates the the code is incorrect. Once the code was fixed, the line went away.
BRACKET BUDDIES!
Brackets (thats: { ) in C# must have a pair. There will never be one by itself.
When you put your curser in front of your bracket, it will highlight it’s matching pair in orange (above). If you are missing a bracket, it will pick a pair that is incorrect. This may make it more obvious when one is solo.
This is slightly more difficult to determine if you’re not familiar with coding, but it’s a good thing to know as you learn.
Thanks for the help dad, my ball rolls all over the plane now! On to the next part of the tutorial. Maybe I’ll even finish it one day.





