(Moderators, if this should be somewhere else, my apologies and I’ll be happy to move it.)
We normally post requests for help here. But this isn’t a request for help, it’s a bug success story!
Out of the blue, my WIP stopped working today. When I finally figured out what I’d done wrong, I couldn’t believe that I’d never tripped over it before, and I wanted to share it for the benefit of others.
My WIP was compiling beautifully (all 23 rooms and 66 objects to date), but all of a sudden, none of my scope adjustments worked. My game depends heavily on adjusting the scope; without adjusting the scope, there is no game.
I hadn’t been working on that functionality, so I had no clue when the code had stopped working. I searched my source for “scope”, and found exactly three instances:
Chapter 1 - Scope After deciding the scope of the player: repeat with target person running through people: place target person in scope.
I couldn’t replicate the problem in a smaller sample, so I finally grabbed my full source code and started hacking it down until I could find the single line or section that was breaking things.
Finally, I found the offending line. I could pull it out, and the game worked; I put it back in, and the game broke. The problem was that it had nothing to do with scope.
The CD player is a closed container.
I uninstalled and reinstalled my copy of Inform. I tried my WIP on a different computer. No luck. I went all the way to The Big Fear: something was dreadfully wrong with Inform, and my game was completely unviable. I would send sad, pleading emails to Graham Nelson for help and receive a promise that it would work in the next release, but the next release would never arrive in time. I would eventually attempt to rewrite the entire scope functionality in I6 and then die bereft in a basement.
Of course, I was wrong, and I figured it out a few minutes later. The moral of the story?
Never name anything in I7 a “player”.
What’s your weirdest code trouble story?