MOO-cows Mailing List Archive

[Prev][Next][Index][Thread]

Re: @create problem



On Sat, 30 Mar 1996, Jeff Kramer wrote:

> > Sorry to bother the list with this question which is probably pretty
> > basic.  I've just installed the latest version of LambdaMOO on a Silicon
> > Graphics machine running Irix.  Everything seems to be working ok except
> > I can't create any objects.  I get the following error message:
> >
> > #90:moveto acceptable (this == #2), line 15:  Invalid indirection
> >   ...called from #1:accept (this == #2), line 2
> >   ...called from built-in function move()
> >   ...called from #4:@create (this == #2), line 41

Welp, the best solution is to find out what went wrong... I do not use 
the new core so i do not know what object #90 is, or what the moveto 
acceptable says... I can _guess_ what the problem is though -- when 
objects are created they are in #-1, the @create verb tries to move them 
to the creator, and #90:moveto tries either to check a property or 
execute a verb on the objects former location -- which is an invalid 
object (#-1). 

This error, however, does not mean the object is not created ! It merely 
rests in #-1, nameless (the namechange is done _after_ the move) and 
possibly without being put in your .owned_objects list. You should be 
careful with this, you can create a lot of unused objects like this :( 

> Same thing happened to me, except I'm running it on a Sparc-Classic/Solaris
> 2.  The easy fix is to just do a @chmod -d #90:moveto, and supress the
> error.  It seems that you have to do that alot to get LambdaCore working.
> (Much thanks to Quinn for enlightenment.)

Hm, well, that is the simplest solution, yes, but it is also a bit more 
dangerous... putting  verbs -d means you get no error messages, and the 
verb continues executing... The object was most likely not moved, and 
whats more, you can get a lot of hard to find bugs... For instance, the 
namechange goes wrong and suddenly you end up with an object with name 
#-3 :-) (just an example, i don't think this can happen save due to 
Database corruption :)

The best solution (IMHO) is to put an if (valid(location)) statement
around the :moveto/acceptable call, or inside the moveto/acceptable verb
itself. This need not be complicated at all, simply a sanity check, and 
if you are new to MOO it is excelent practice :)

Remember, use @list and @display to find the cause of errors, you can 
find out what a given line does with @list, then check on property 
contents and permissions and verb permissions using @display (@d object: 
to see the verbs, @d object. to see the properties)

Hope this helps a bit,
  Thomas.

Thomas Wouters   |   Visit The Digitale City (DDS)   | Forever an Addict to 
zonny@moo.dds.nl |    The Dutch Digital Community    | Virtual, Digital,
Ynnoz @ MOOs     | http://www.dds.nl/plein/centraal/ | Unconventional Rubbish
Jay_* @ MUS[HE]s |  WWW -- World Wide Wackos :)      | (Except for Windows)




References:

Home | Subject Index | Thread Index