- Learn
- Tutorials
- Algorithms
- Binary Search
- Appendices
- E Troubleshooting
Appendix E — Troubleshooting
Every chapter’s If it didn’t work names the slips most likely in that chapter, and how to find each one. Here they are together, chapter by chapter.
Two checks find most of them. First, names must match exactly: a message, a timer or a table row is matched letter for letter, capitals included. Second, compare with the chapter’s game. Every chapter’s Goal holds the game as it is at the end of that chapter, and its catch-up download is that chapter’s finished project. Play it next to yours.
E.1 Chapter 1: Safe Room
The display shows dashes, never 50? Perhaps New Safe never ran. Look for Safe Rules in the Scene, and for New Safe on it. Open New Safe and look for a block standing apart, with no arrow into it, and join it with Connect to Sequence. Last, look at its Change Variable, $entry, with its $.
It shows 50, but the dashes show too? Then Entry Value and No Entry are both visible, one on top of the other. Look at the Entry Display’s Variables. Is entryText Entry Value, and emptyText No Entry? In Show Entry Or Dashes, each branch’s two Set Visible Actions should name different texts.
The display stays at 50 when you type? Perhaps the game window didn’t hear the keyboard, so click the game once, then type. Still 50? Look at Keypad Keys on Safe Rules, and at each Event’s Command.
Typing 4 gives 504, not 4? Then the first digit isn’t replacing the entry. Look at startsNewEntry in Safe State, whose Value should be on, true. Then look at Type Digit’s first If, whose condition ends startsNewEntry == true.
Typing 4, then 2, gives 2? The second digit replaced the first too, so look at step 3 of Type Digit, which sets startsNewEntry to false.
Typing 4, then 2, gives some other number than 42? Look at the two Operators in Type Digit: *= for the 10, then += for the digit. With = in place of either, the entry is replaced instead of added to.
Every keypad key types 0? Each placement needs its own Digit, typed into its Type Its Digit part, under Per Instance Variables. The label, set with Edit Object Locally, only changes what the key says.
Back does nothing? Perhaps the message is spelled two ways. Look at the Back Key’s clickEvent, backClicked, and at Button Clicks’ Custom Event. Then look for Button Clicks on Safe Rules, and for Safe Rules in the Back Key’s safeRules.
E.2 Chapter 2: Human Scan
Nothing happens when you press Enter? Perhaps the new Event in Keypad Keys has no Command, or a block in Scan Guess stands apart, with no arrow into it. Look at the Scan Command’s key, too. Enter works, but SCAN doesn’t? Then look for scanClicked, spelled the same, on the Scan Button and in Button Clicks.
The message always says “Start a new safe.”? Then the trial isn’t Locked, and Scan Guess turns every guess away. Look at Initial Game State in Game Settings, and at Start New Safe’s Set Game State.
Every guess says “Use the remaining range.”? Perhaps $low and $high are both still 0. New Safe should call Start New Safe when the game starts, and Start New Safe sets them both. Look too at Scan Guess’s condition: $entry >= $low && $entry <= $high.
HIGHER when the code must be lower? Look at Check Guess. When the guess is below the code, the clue is 1, not -1.
The clue is right, but the range never moves? Look at Follow the Clue’s two Change Variables, $lastGuess + 1 for $low and $lastGuess - 1 for $high. One may have gone into the other’s box.
The count goes past 7, and OUT OF SCANS never comes? Look at the scanBudget cell, and at the If in Follow the Clue that compares $scans with it. Is it inside the HIGHER-or-LOWER If, on one side only? It belongs after it, at the end of step 6’s Else.
Does a digit change the entry after UNLOCKED? Look at Type Digit’s outer If, step 2, and the Else that should hang from it at step 9. Move the Else there, run again, and the message can say “Code sealed.”
A digit still changes the entry after the safe opens? Look at Type Digit’s step 9. Its Else belongs to step 2, the Locked test. Move it there, run again, and the message can say “Code sealed.”
The safe never opens? Perhaps Show Safe Door isn’t on the Safe. Look at its two Set Sprites too, each with its own picture picked.
The words stay “possibilities remain” with one code left? Look at Show Possibilities’ second Event. On the canvas, under When, it should read When any global variable changes.
E.3 Chapter 3: Scan Record
No strip at all? Perhaps Lay Out Scan Record never ran. Look for it on Safe Rules, with Scene Start as its Event. Look too at the four Objects under Safe Rules’ Variables, because a codeMark left at None makes nothing.
All the marks pile up in one spot? Then Set Position isn’t aimed at mark. Look at its box after the word on, where mark belongs. Look at its Position Relative To list too, which should say Screen.
The marks never change color? Look at Show Code Mark’s Event, which listens for scans, written without the $. And look at the Code Mark’s Mark Face. Each mark needs its code, set by the Change Variable mark.code in the Repeat.
Every mark turns dark, even the teal ones? Perhaps the second condition has one of its two tests turned round. It reads self.markFace.code >= $low && self.markFace.code <= $high.
The cards never show? Perhaps Record Scan isn’t called. Look at the end of Scan Guess’s inner True line. And look at Record Scan’s Row, text('Scan ', $scans), with a space after Scan inside the quotes. Show Scan Card looks for a row of the very same name.
A card shows the guess, but no word under it? Look at Clue Word’s Return, and at its RETURN TYPE, which should be Text.
Old cards stay after R? Look for Reset Data Table in Start New Safe. Without it, the cards of the last trial keep their rows.
E.4 Chapter 4: Computer Search
Pressing C does nothing? Perhaps Choose Role isn’t on Safe Rules, or the Computer Command has no key.
Typing in Setup says “Code sealed.”? Then Check Keypad Open is saying no. Look at its first test, the Check Game State for Setup. In Game Settings, Setup should be the fourth Game State, and Start Code Setup’s Set Game State should pick it.
Enter scans in the Computer role, or locks in the Human role? Then both roles are on, or the wrong one is. In Safe Rules’ Attached Logic, Computer Role’s switch should start off, and each Choose Role Function’s two Set Logic States should pick the right Logic Components.
Space does nothing? Lock a code first, because Take a Step works only while the safe is Locked. If it still does nothing, look at the Step Command’s key, and at Computer Role’s Step Event.
The computer guesses the same number over and over? Look at Take a Step’s call to Choose Midpoint, where low is $low and high is $high, each with its $.
A piece never shows, or never hides? Its layoutRow under Variables should be spelled exactly like its row in the Screen Layout table. And roleChosen should be spelled the same in Trigger Custom Event and in Show In Situation’s Event.
Both tabs gold, or neither? Look at the second placement’s Is Computer Tab, and at the first one’s Sprite, made Safe Gold by Edit Object Locally.
E.5 Chapter 5: Run and Compare
Does RUN start when the game opens? Run Search’s Attached Logic switch on Safe Rules should start off, waiting for your press. Turn it off, save, and begin a new run.
RUN does nothing? First lock a code in the Computer role. Then check Run Search’s On Enable and Recurring Timer Events. Their timer names must match computerTurn. A block standing apart from the line needs Connect to Sequence.
The scans continue after PAUSE? Look at On Disable’s Stop Recurring Timer, and compare its name with the timer On Enable started. Correct that name, run again, and pause between two cards.
Does PAUSE remain after the search stops? Look for runChanged in Show In Situation, the Event that listens when Run Search turns on or off. Check the running column too: Pause Button is Yes there, Run Button is No. Try the switch again.
Does Watch computer give a different code? Look at its reset call, before the new trial starts. Reset Trial leaves the code alone, while Start New Safe would draw a different code for the computer. Restore Reset Trial, then finish another human attempt and compare again.
Your result vanishes after the computer’s first scan? Write Human Result reads humanScans from Safe State, not the new $scans. Check that field path and try the handover again.
F opens the panel but can’t close it? Check both context lists for Lesson, the Command that belongs in each group. Put it in Myth Lesson’s Command Set too, and F can get you back.
A button still works under the lesson? Safe Button’s new If must hold its old trigger, with worksInLesson on only for the lesson’s two buttons. Check that nesting first. Digit Key uses the separate check in Type Its Digit. Fix the one you clicked, then open the panel again.
The lesson’s lines all change together? You edited Lesson Line itself instead of a placement. Restore the Object from its card, then change each placement with Edit Object Locally. Its words become its own again.
