Re: [CODE] question about top_of_world

From: krenshala (krenshala@jump.net)
Date: 12/13/01


> > [I'm trying to clear up warnings about values always being true, and
they
> > keep involving GET_ROOM_VNUM() and/or top_of_world.  I have changed
> NOWHERE
> > (et al) to 65535 (zone vnums are unsigned) and I -think- that might be
> part
> > of the problem. /: ]
>
> If you changed your vnums to unsigned, you also need to root out all the
> places in the code that test like this:
>
> if (vnum >= 0) { /* This is a valid room */
>   ...
> }
>
> and possibly the reverse (vnum < 0 means invalid room).  Obviously, tests
> that include the top_of_world should still work:
> if (vnum >=0 && vnum <= top_of_world) { /* This is still valid */
>   ...
> }

But the only place I find top_of_world defined, it has a value of zero (0),
which means

    if (vnum >=0 && vnum <= top_of_world)

will only be true if vnum == 0 (adn the Void is room 0).

:(

     Larry

Larry Robinson
krenshala@jump.net
:wq

--
   +---------------------------------------------------------------+
   | FAQ: http://qsilver.queensu.ca/~fletchra/Circle/list-faq.html |
   | Archives: http://post.queensu.ca/listserv/wwwarch/circle.html |
   | Newbie List:  http://groups.yahoo.com/group/circle-newbies/   |
   +---------------------------------------------------------------+



This archive was generated by hypermail 2b30 : 06/24/03 PDT