I seem to have grown a habit of making Inform do what it should not do. The latest, hard locking. No error is given, the game just stops accepting input. You can hit enter or type other things in, but nothing happens and the game does not proceed. Is there some way to get some idea of what went wrong?
I have an idea what may be causing it. Is there another way to check a text for content rather than if TEXT is “”: ? Text may have text, or it may have calls to other things “[awesome function]”. I don’t want said functions called while checking to see if text exists or not.
If TEXT is empty…
Remember, text and indexed text are the same now, so you can use indexed-text functions on any text variable.
As a side note, that happens to me sometimes in large-ish projects. Recompiling usually fixes it.
Recompiling I’ve done many times as I tried desperately to find the exact line where everything explodes.
Trying the ‘is empty’ code though, thanks, let’s see how it works!
A word of caution: I’m not sure if that substitutes the text or not. If it it does, this should work.
To decide whether (T - text) is empty without substitution:
let X be "[T]";
decide on whether or not X is empty.
It is fixed! Apparently checking ‘is empty’ does not produce the lock that ‘is “”’ does. Thank you so very much.
I didn’t realize this, but you’re right: comparing
if textval is "LITERAL":
…performs substitutions on textval, I guess to see how it comes out.
This shouldn’t lock up your game. Maybe you’ve got something recursive in the substitutions. (I know you’ve got a lot of code in there.)