Re: TADS problem with "plug" verb


26 May 1995 14:24:35 GMT

David Gilbert (dgilbert@bu.edu) wrote:

: Argh! I'm at my wit's end! I'm trying to implement a phone in TADS. The phone
: starts off unplugged. I'm coded three objects: the phone, the jack, and the
: phone cord. I can't get it to compile! Here's the code I used. Can
: all you expert Tadsers see what I did wrong?

Second what Gareth said about the ldesc code. Otherwise:

The phone and the jack each need to have a line

verIoPlugIn(actor)={}

Otherwise, you'll get "I don't know how to plug anything into the
phone/jack."

As for the cord, it needs to be

verDoPlugIn(actor,iobj)={}
doPlugIn(actor,iobj)= ... etc.

so that TADS knows you're dealing with an indirect object as well.

: I get these three errors:

: error TADS-302:
: officePhone.isActive := nil

You only need to code this like this if it's part of a routine (i.e.,
inside {} brackets). Here you should just put

isActive=nil

(Actually, since the default is nil, you can just omit the line altogether!)

: error TADS-300
: officePhone.isActive := true);

Kill that ) mark, and it should work fine.

: error TADS-301
: else "It won't plug into that.";}

I think this is probably an artifact of the previous problem.

And hey, you need to upgrade to TADS 2.2. Those no-description error
messages are wack.