Re: Incorporating lifespan in act.informative.c

From: Thomas Arp (
Date: 12/11/00

From: "Surgeon" <>
> what steps would one take to incorporate the availability to
> change/modify/compare the lifespan of a zone in act.informative.c,
> in other words what externs, file includes, local structs would be
> neccessary to access ie: zone_table[OLC_ZNUM(d)].lifespan.

#include "oasis.h"

extern struct zone_data *zone_table;
extern zone_rnum top_of_zone_table;

All you really need are the above three lines. Also, you must check if the descriptor has an olc structure before checking on the OLC_ZNUM() - otherwise you'll almost certainly end up with a crash.

You might want to make a macro for quick access to the lifespan:

#define ZONE_LIFE(loc)  (zone_table[(loc)].lifespan)

- add this in utils.h (near ZONE_FLAGS).

NOTE - the above is mailercode - back up your code first.

Welcor of Builder's Academy

   | FAQ: |
   | Archives: |

This archive was generated by hypermail 2b30 : 04/11/01 PDT