What is the GET_RT macro? I don't see it in bpl11, but it may be stock
for a newer one. Anyway what is the macro, and the datatype of the
roundtime that it points to. Just post your char_data declaration from
structs.h and the GET_RT macro, because as of right now, I don't really
see anything wrong with the code, unless a part is illegal in some
compilers? Also, are you initializing it somewhere? If this is a
pointer, and no memory is allocated to it, it can be overwriting a random
piece of memory, unless it is initialized somewhere.
|| Great acts are made up of small deeds. ||
|| -- Lao Tsu ||
||-----------------------------------------------||
|| Cervo the redoC retsaM ||
|| chrisf@ptd.net ||
|| Molefudge.dyn.ml.org ||
|| WEB PAGE: http://home.ptd.net/~chrisf/ ||
||-----------------------------------------------||
|| If you cannot convince them, confuse them. ||
|| -- Harry S. Truman ||
\\\\\\\\\\\\\\\\\\\\\\\///////////////////////////
\\\\\\\\\////////
\\\///
\/
On Mon, 13 Jul 1998, John Woods wrote:
> I changed my ch's to d->character's, but it stops at the same place. Roundtime
> is a member of player (char_data), I think...anyone know what I'm doing wrong?
> I need it to work with a command that uses char_data, so this is the only
> thing I can do. Can't move it to another struct, or the command won't work,
> see?
>
> void update_roundtime(void)
> {
> struct descriptor_data *d, *next_d;
>
> log("For statement");
> for (d = descriptor_list; d; d = next_d) {
> log("Next_d = d->next");
> next_d = d->next;
> log("Checking to make sure RT >= 0.");
> if (GET_RT(d->character) < 0) GET_RT(d->character) = 0; <=crashes here.
> log("Subracting 1 from RT");
> if (GET_RT(d->character) > 0) GET_RT(d->character) -= 1;
> log("Done.");
> }
> }
+------------------------------------------------------------+
| Ensure that you have read the CircleMUD Mailing List FAQ: |
| http://democracy.queensu.ca/~fletcher/Circle/list-faq.html |
+------------------------------------------------------------+
This archive was generated by hypermail 2b30 : 12/15/00 PST