Common Mistakes - 2491-NoMythic/How-to-Robot GitHub Wiki
Anecdote from [REDACTED]: About half of the time, your mistake will be from copying/altering a program and either forgetting to change a variable or missing the fact that an important bit is in an import you can't use. The only way to fix that is to look at the original and Ctrl+F all of its variables and imports in your version. With that out of the way, on with the mistake list.
Did you copy-paste something without knowing what it did or how it worked?
Find the bit you copied and read through it carefully. Look for imports and variables that you might have missed. If possible, find someone who does know what the bit of code does and have them explain it to you!
Did you forget a semicolon (this thing -> ;) at the end of your statement?
Look for any statements without semicolons. There will be times where you don't need semicolons, however those are usually in lists and look like this
myFunction(
object1,
object2,
object3);
Did the build fail?
This can come from a multiple of errors, but usually VSCode will tell you where it is. Their quick fixes do not work, they will just remove the line completely.
Is the code right but the computer does not understand what you put in?
This is usually an import or library issue, fixable by checking your vendor libraries (look at Robot Specifics).
Did your computer die?
Sometimes computers don't get charged and die/crash while you're coding. The solution to this is to plug it in and pray it didn't wipe your edits.