What if the code didn’t work? The truth is, all engineers make mistakes in their code. It’s no big deal, and the editor and the output window can help you spot mistakes and fix them. Try making a couple of mistakes to learn how to better spot them later:
Delete the second parenthesis from the print function. A red line appears under local. (See Figure 1.17.) In the editor, red lines indicate a problem.
FIGURE 1.17 A red line indicates Studio has spotted an error.
Hover over the red line, and the editor gives you a clue about what’s gone wrong, as shown in Figure 1.18. But don’t fix the mistake quite yet.
FIGURE 1.18 An error message displays when you hover over the red line.
Click Play, which causes an error message to display in the Output window, as shown in Figure 1.19. Click the red error, and Studio takes you to where it thinks the problem is.
FIGURE 1.19 The error shows up as a clickable red message in the Output window.
Stop the playtest and fix the issue.