- Learn
- Tutorials
- Algorithms
- Dijkstra’s Algorithm
- 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.2 Chapter 2: Paint the Maze
Clicking a terrain button does nothing? Find the UI Activated block in Choose Terrain. Its line should hold Choose Brush, with an arrow into it. A block standing apart does nothing, so join it with Connect to sequence. Did Choose Brush land by another Event? Right-click it there and choose Delete. Then right-click UI Activated’s Mode, choose Add unattached Action here, and add it again.
The keys choose, but the buttons never change color? Perhaps Choose Terrain has no Variable Changed Event, or it names another Global. It should say brush. Look at Highlight Terrain Choice’s If too: terrain == $brush, with the $.
All four buttons say Road 1? The placements have lost their terrains, which happens if Show Terrain Choice was deleted instead of renamed. Select each placement and type its terrain into Terrain, under Per Instance Variables, as in Chapter 1: Forest, Mud or Wall. The buttons are right again.
Pressing 1 to 4 does nothing? Look in the Input Manager, where each Choose Command needs its key. Choose Terrain By Key belongs on the Selection.
The ring won’t move at all? Perhaps Maze Settings still holds 0 in its rows column, the map’s height. Add Field put that 0 in the rules row, and a map 0 rows tall has no room for any step, so Find Grid Neighbor answers -1 every time. Type 10.
The ring moves the wrong way? Look at the Direction pressed on each Event’s block in Move Selection, and the name each one passes on.
The ring jumps to the far side of the map at an edge? Look at Find Grid Neighbor’s If. It needs all four tests, joined by &&. With || between them, one true test is enough, and the ring wraps.
A click moves the ring but paints nothing? Follow the chain. Is Change Terrain on Maze Rules? Does it listen for paintRequested, spelled the way Paint Map Cell sends it? Is Paint Selected Cell’s Set Data Cell joined inside its If? And does Paint Map Cell have its terrainChanged Event? Without that Event, the cost in Maze Cells changes, but the picture never follows it.
E.3 Chapter 3: Settle One Cheapest Cell
Step does nothing at all? Follow the message. Request Step, on the Step Button, sends stepRequested. Step Trial’s Event must name it the same way, capital R and all. Is Step Trial on Maze Rules? Then open it, and look along Ready’s line for a block standing apart, with no arrow into it. Join it with Connect to sequence.
Every cell says cost 0, or every cell has a thin cyan ring before the first Step? The distances are still the 0s from Add Field. Clear Trial never ran. Look at Reset Trial’s When the Scene Starts: it should call Clear Trial, with self as its rules.
Does the first Step say “Check search settings.”? The rules row of Maze Settings still holds 0 under maxCost and unreached. Type 99 and 1000000, and step again. If it says “Use costs 0 to maxCost.” instead, it’s the same row: maxCost is still 0.
Does the second Step already say “No route.”? The camp’s offers never landed, then, and perhaps Relax Neighbors never runs at all. Look at Ready’s step 8, under the Else of step 5’s If. Or look in Relax Neighbor for a block standing apart, since both Set Data Cells sit inside its second If.
The Status line runs the word into the number, as in cost3? The cellSettled words need a space after cost. Double-click that cell in Messages, and type it.
After R, does the next Step say “No route.” at once, or do nothing at all? Then Step Trial never went back to Ready. Clear Trial’s last step should send trialCleared to rules. And Step Trial’s On Trial Cleared should Reset Modes on On Step Requested.
Cell 12 comes before Cell 03? Look at the third test in Choose Cheapest Cell’s If. It should say <. With <=, a tie moves your finger, and the higher number wins.
Status names the cells, but no ring shows? Perhaps the rings were never made. Look at Lay Out Map’s three new steps, inside the Repeat. Then open the Map. Under Variables, searchOutline should say Search Outline. Or perhaps they never hear searchChanged: look at Show Search Outline’s second Event. Or perhaps they stand off the screen: in its first Event, Set Position should say Screen.
The rings show, but never turn thick? Look at Color Search Outline’s step 8, whose Frame should be 1.
R does nothing? In the Input Manager, the Reset Command needs its key. And Reset Trial needs its Command Pressed Event, set to Reset.
E.4 Chapter 4: Finish a Route
Cost still shows two dashes after the tower settles? Look for Show Route Cost in Route Cost’s Attached Logic, and at its two Change Component Values, which write self.text.text.
The Status line names Cell 119, not “Building route…”? Show Settled Cell’s If isn’t asking about the tower, because its row should compare $currentCell with goalCell.
The tower settles, and the next Step does nothing? Perhaps Step Trial still switches to Finished there, so look at Searching’s step 4. Its Mode should say Tracing.
Every ring is yellow, before the first Step? The routeOrder column still holds Add Field’s 0s, and a 0 means the tower’s place on the route. Look at Clear Trial’s step 5, inside its Repeat. Is it standing apart from the rest, with no arrow running into it?
Does the trace stop at once, with “Invalid route.” on the Status line? A link failed its check. Perhaps Check Route Link’s Return hands back something other than isValid, or step 13’s Operator is = where it should be +=.
Only the tower’s ring turns yellow, and more Steps add nothing? The trace never leaves the tower. Look at Tracing’s step 9, on the second If’s True line. It moves traceCell on.
The Status line reaches “Follow the route.”, but no ring turns yellow? Look at Color Search Outline’s step 13, the If that asks for a routeOrder of 0 or more. Perhaps it stands apart, with no arrow into it. Or look at the routeTint box in each of Show Search Outline’s two calls. It may be empty.
The rings turn yellow, but no line joins them? Look on the Map for Lay Out Route Lines, with both of its Variables set. After that, look at Show Route Line’s Set Position. It should say Screen.
Every piece of line stands upright, even across the top of the map? Set Rotation belongs inside the If, on its True line.
The line looks white, or wide and all yellow? Each piece’s color comes from Show Route Line: the line keeps the yellow lineTint starts with, and the backing’s lineTint, under its Variables, should be #101d29.
The compass never leaves the camp? Look for Slide Marker on the Marker. And look at the name markerMoved in two places, Step Trial’s Replaying and Slide Marker’s When bar.
The compass stands on each cell’s upper-right corner, not its lower-right? Look at Marker Screen Position’s step 5. It takes markerOffset away from y, because down is a minus.
The compass wanders off the yellow line? Look at Replaying’s step 4. It should look for markerOrder - 1, the next cell along.
The compass jumps one cell and stops, and Step does nothing more? Perhaps Maze Layout’s board row still holds the 0 that Add Field gave slideSeconds. Type 0.2.
The compass slides once, but never again? Step Trial’s On Marker Landed should switch back to Replaying on its Else line. And Slide Marker’s timer Event should send markerLanded. That Event and Start Recurring Timer must name the same timer, markerSlide.
E.5 Chapter 5: Find and Pause
Every trial ends with “Cheapest route.” on the Status line, even with the camp walled in? Look at Searching’s End Trial call, at step 8. Its Ending box should read noRoute. A new call starts at cheapestRoute, and perhaps this one kept it.
End Trial’s calls in Step Trial don’t read self · Maze Rules in their rules box? Perhaps Step Trial still says Any Object. Click the heading of its Logic Component card, and set Attach to Maze Rules.
Find route does nothing at all? Look for Request Find on the Find Route Button, and Find Route on Maze Rules. After that, look at the name findRequested in both.
The button reads Pause, but nothing moves on the map? Look at Find Route’s timer Event. It should name searchTick, the same timer that Start starts. Look at its Trigger Custom Event on Object too, which sends stepRequested.
The second press doesn’t pause? Look at Start’s step 4. Its Switch Mode should turn On Find Requested to Pause.
The first press pauses, but every press after it only says “Paused.” again? Look at Find Route’s On Find Stopped. It should turn Pause off, then Start on, so the next press means go.
The button keeps saying Find route while the search runs? Look for Show Find Caption on the Find Route Button, and at the name findStarted, in Start and in Show Find Caption.
After the trial ends, Find route says “Searching…” and turns the button to Pause, but nothing else happens? Start Over never joined Start, and Step Trial is still Finished. Look at End Trial’s step 2, which sends trialEnded, and at On Trial Ended’s step 2.
After a trial ends, your next press of Find route only clears the search away, and the new one waits for a second press? Start Over stands after Start. Right-click it and choose Move Left. The Modes run in their order, and Start Over has to clear the trial before Start begins.
You press R while Find route runs, and a moment later the search starts again by itself? Look at Clear Trial’s step 11, which sends trialCleared. And look at Find Route’s On Trial Cleared, which hears it.
You press Step while Find route runs, and the search races on regardless? Look at Request Step’s two Events. Each should call Ask For One Step, which sends pauseRequested first.
Escape does nothing? Open the Input Manager, and look at Pause’s row. It should read Escape. A single Escape cancels the capture, so press it twice, quickly.
