A quick workaround for this is to edit int number_argument in interp.c
so that this:

    for ( pdot = argument; *pdot != '\0'; pdot++ )
    {
        if ( *pdot == '.' )
        {

becomes this:

    for ( pdot = argument; *pdot != '\0'; pdot++ )
    {
        if ( *pdot == '.' && pdot != argument )
        {

that way it will only try to parse it as a number argument if the first
character entered for the argument isn't a '.'... of course after
testing this myself, it worked fine for "get .32", but if there say, 3
items of that same name in the room and you wanted the 2nd one of them,
you'd have to reference it as "2..32" so the code would read it as: 2.
'.32'

Richard Lindsey
Network Administrator
INTERA, Inc.
9111A Research Blvd.
Austin, TX  78758
(512) 425-2006
[EMAIL PROTECTED]

-----Original Message-----
From: Jason Gauthier [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, November 18, 2003 8:21 AM
To: George Whiteside; [email protected]
Subject: RE: do_get parsing question

The reason is because all the the functions that 'lookup' an object call
number_argument.

This splits the object by '.'.

ROM uses 1.object, 2.object, 100.object to reference thje specific
object if
there are multiples in the room.

If you look at the code for number_argument, you will see exactly what's
going on.

My recommendation:  don't mess with the period.


> -----Original Message-----
> From: George Whiteside [mailto:[EMAIL PROTECTED] 
> Sent: Tuesday, November 18, 2003 9:13 AM
> To: [email protected]
> Subject: do_get parsing question
> 
> Okay, quick question. (For somebody, I hope.) I have an object with an
> obj->name of something like ".32 automatic bullet". I found 
> that trying 
> obj->to
> TAKE/GET anything with a name prefixed with a period doesn't 
> work. So in other words, if I have two objects in a room, say 
> ".32 automatic" and ".45 automatic," I would only be able to 
> pick up the first one listed by using "automatic" as a 
> keyphrase, since neither ".32" or ".45" will match up.
> 
> My actual question is of course why, or rather where, this 
> happens. I traced the do_get function all the way to the 
> "LOWER" macro utility and back, and I can't seem to find a 
> place where having a period as the first character in a 
> string would cause this to fail. I was a bit tired yesterday, 
> but after looking on a fresh mind today I'm still out of 
> ideas. Could someone point out what I'm overlooking so I can 
> correct this? Thanks in advance.
> 
> ---
> [This E-mail scanned for viruses by Declude Virus]
> 
> 
> --
> ROM mailing list
> [email protected]
> http://www.rom.org/cgi-bin/mailman/listinfo/rom
> 

-- 
ROM mailing list
[email protected]
http://www.rom.org/cgi-bin/mailman/listinfo/rom

Reply via email to