Re: [NEWBIE][CODE] locate object

From: Michael Toomey (mat70@txcyber.com)
Date: 02/06/03


if (world[i->carried_by->in_room].zone != world[ch->in_room].zone)
  continue;

What about:
if (world[i->in_room].zone != world[ch->in_room].zone)
// this would check to see if object in anywhere in zone if not don't list
it
continue;
then:
if (world[i->carried_by->in_room].zone != world[ch->in_room].zone)
// this would check to see if anyone carring the object is in zone if thier
not don't list them
  continue;

I could be wrong i'm not looking at code and doing this from memory.
you could go into the DB.C and look at the zone resets and limit object code
to see how it handles checking for object if thier in a zone already and at
max ect ect. this would show you the basics of what you needed to know.

Like i said not looking at code.

If you need help and just can't figure this out let me know I'll look at
code and send you the pieces you need. Personally i would prefer you do it
on your own because this isn't that hard to do and all the answers are in
db.c and other files :), but I can relate being a newbie coder at one time
(still am :P).

Siath

--
   +---------------------------------------------------------------+
   | 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/26/03 PDT