Newsgroups: rec.arts.int-fiction
Path: gmd.de!rrz.uni-koeln.de!unidui!math.fu-berlin.de!ifmsun8.ifm.uni-hamburg.de!news.DKRZ-Hamburg.DE!dscomsa!dxcern!mcsun!uknet!comlab.ox.ac.uk!nnhost!tr95005
From: tr95005@oxford.ac.uk (Richard Forster)
Subject: TADS & 'everything'
Message-ID: <TR95005.93May13000901@black.oxford.ac.uk>
Organization: /u7/tr95005/.organization
Distribution: rec.arts.int-fiction
Date: 13 May 93 00:09:01
Lines: 49


I'm trying to stop some of my verbs in TADS from allowing the use of ALL on
direct objects (please tell me if I'm missing a really easy way of doing this.)
I've got a partial solution at the moment, but it falls down slightly because
of the way the 'doDeafult' function is used both when no object is specified
and when ALL is used.

The sort of code I've got at the moment is along the following lines:

In the verb I want to prevent the use of ALL in I'll have a line like :-

doDefault (actor, prep, io) = { return ([no_m1, no_m2]); }

(I need to specify two objects in the list, because if there is only one when
 the player types in the verb without a noun it thinks the single list is the
 required object.  This way it will give a message along the lines of
 'what do you want to inspect?' etc....)

I then have two objects defined along the lines of :-

no_m1 : object
  dobjGen (actor, verb, a, b) =
   { "You can't use multiple nouns with that verb!";
     exit;
   }

no_m2 : object
  dobjGen (actor, verb, a, b) =
   { "";
     exit;
   }

but this has the drawback of displaying a message along the lines of

:  You can't use multiple nouns with that verb!
:

and I don't a) want the initial semicolons, and b) don't want the blank line.

Any suggestions gratefully recieved.

Richard

--
-------------------------------------------------------------------------------
Most contemporary scholars now see Victorian London as an overcrowded,
polluted, and impoverished blueprint for the modern metropolis.  But Victorian
London was more than just that.  It was diseased and crime-ridden as well.
-------------------------------------------------------------------------------
