When I have the preCond = [objHeld] under an action method for an object that I can’t take (e.g. Heavy, Fixture) , the game crashes saying I have a nil object reference. It seems verify still gets checked first, so I could modify those object types to prevent any such thing, but I was wondering if there’s a better solution.
I’m afraid I’m unable to reproduce this error on the basis of the information given. When I tried it, using the code you posted, everything worked fine. Well, almost fine: I did incidentally find another small bug (the game was reporting the wrong object as the one that couldn’t be moved), but it wasn’t causing a run-time error and can be fixed simply by replacing dobj with cobj in all the various definitions of cannotTakeMsg.
I did wonder about the definition of the missingQ property on your VerbRule, since I don’t think the library uses {the dobj} in this context at all (it always uses ‘it’), and it’s possible this could give rise to problems, but it didn’t cause any for me.
It seems to me, then, that there must be something else in your code (i.e. code that you haven’t posted) that’s triggering this problem.
Hm, even removing {the dobj} and {the cobj} completely I still get issues (on line 1072 of messages.t, specifically). I’m fusing rock with rock is mostly for convenience sake, but I still get the error with any other dobj (though I do need to remember to prevent fusing something with itself later on).
Ah no that explains it. I kept trying to change the fuse message and couldn’t figure out what I needed to do. I’ll be sure to update the library, thanks!