Newsgroups: rec.arts.int-fiction
Path: nntp.gmd.de!news.rwth-aachen.de!news.rhrz.uni-bonn.de!RRZ.Uni-Koeln.DE!news.duesseldorf.ecrc.net!news.hamburg.ecrc.net!news.berlin.ecrc.net!news.ecrc.de!02-newsfeed.univie.ac.at!01-newsfeed.univie.ac.at!voskovec.radio.cz!www.nntp.primenet.com!nntp.primenet.com!howland.erols.net!netcom.com!erkyrath
From: erkyrath@netcom.com (Andrew Plotkin)
Subject: Re: [Inform] Object Limitation? pls help.
Message-ID: <erkyrathDxyLBp.5BF@netcom.com>
Organization: NETCOM On-line Communication Services (408 261-4700 guest)
X-Newsreader: TIN [version 1.2 PL1]
References: <32352C14.69A6@easynet.co.uk> <51q450$s3v@newsbf02.news.aol.com>
Date: Thu, 19 Sep 1996 02:52:37 GMT
Lines: 45
Sender: erkyrath@netcom15.netcom.com

NNelson334 (nnelson334@aol.com) wrote:
> please, can anyone help me with this one? im programming in Inform, on a
> Macintosh, and ive got a problem with my MaxZip (v 1.4.0) interpretor
> freezing (the interpretor, not my Mac) every time i try to move 25
> objects, including the player, into a room. this does not happen in any
> other Inform game i have played with. this, i assume, is cos no other
> Inform game i have played contains the bad coding mine has.

Probably. :-) Hack and learn.

> is there a specific number of objects one can have in any given room at
> one time? i realize of course that rooms _are_ objects. so the question
> could more precisely be stated as, is there a maximum number of objects
> allowed to be moved into another object?

No. This is not a limitation of the Z-machine (or MaxZip.) It's you.

Could you post the fragment of code which is doing the moving?

I can think of one possible mistake immediately. The following goof is 
common:

objectloop (obj in room1) {
  move obj to room2;    ! wrong!
}

The contents of an objects are effectively in a linked list, and the 
objectloop construct iterates down the links. If you move (or remove) the 
objects, it gets horribly confused.

A correct implementation is:

while (child(room1) ~= nothing) {
  move child(room1) to room2;
}

Footnote: You shouldn't move the player object; you'll confuse parts of 
the library. Use the PlayerTo() function.

--Z

-- 

"And Aholibamah bare Jeush, and Jaalam, and Korah: these were the
borogoves..."
