I am trying to make it easy for people to report bugs right in the middle of the game (and for me to see the context in which they appeared), by asking people to turn on Scripting, and then whenever they have a comment they want to make they can simply say >bug When I do foo, foobar happens.
Of course the game won’t recognize some of the words, but all I have to do is sweep their transcript for the word “bug” and out will pop all their comments.
This sorta works, but sometimes it crashes the game.
Here is the very simple code I set up. Is there a better way to do it?
DefineIAction(Bug)
execAction() {
{mainReport('Thanks. I\'ll look into it. '); }
}
;
VerbRule(Bug)
'bug' singleTopic
: BugAction
verbPhrase = 'bug/bugging'
whichMessageTopic = DirectObject
construct()
{
/* set up the empty direct object phrase */
dobjMatch = new EmptyNounPhraseProd();
dobjMatch.responseProd = inSingleNoun;
}
;
Thanks,
–Bob