A warning to all those using adv3Lite: One of my beta testers (the fantastic @ChristopherMerriner) discovered a fatal bug that will cause the parser to crash. If the player enters CUT
without an object, the game halts with this response:
Runtime error: nil object reference
-->/usr/local/share/frobtads/tads3/lib/adv3Lite/english/english.t, line 3797
/usr/local/share/frobtads/tads3/lib/adv3Lite/english/english.t, line 3753
/usr/local/share/frobtads/tads3/lib/adv3Lite/parser.t, line 5181
...
The problem is that the Cut
verb does not define a missingQ
(“missing question”) property. The parser crashes because it manipulates missingQ
as a string to present a message to the user (“What do you want to cut?”).
Because VerbRule
is a grammar predicate
, I don’t know a better way to patch those objects without replacing them. I wound up doing this in my game code to correct the bug:
replace VerbRule(Cut)
[badness 500] 'cut' singleDobj
: VerbProduction
action = Cut
verbPhrase = 'cut/cutting (what) (with what)'
// no missingQ leads to CUT command (with no noun) to crash interpreter
missingQ = 'what do you want to cut;'
;
There might be a way to modify
rather than replace
, but the above does work.
Alternately, you could simply add the missingQ
line to your copy of adv3Lite, but I avoid doing that for reasons of sanity.