Re: help with the define for GET_SAVE

From: Rich Chiavaroli (rchiav@FRONTIERNET.NET)
Date: 11/07/97

> #define GET_SAVE(ch, i)
> ((ch)->char_specials.saved.apply_saving_throw[i])

I think this is to get saving throws. It's use would be
GET_SAVE(ch, <insert save to get here>)

> This is located in utils.h.  I tried grep searching for
> char_specials.saved.apply_saving_throw but it is only in utils.h...  I'm
> confused on the blah_blah.blah.blah_blah format.

OK.. From what I understand which isn't alot compared to some people on
here.. this is a linked list. char_specials can be thought of as a table,
saved is one of the fields and it happens to be another table.
apply_saving_throw is an array which is in the table saved. The reason
that you don't see it anyplace else is bacause te marco GET_SAVE()
replaces it. instead of typing
ch->char_specials.saved.apply_saving_throw[2] every time you wanted to get
that praticular saving throw, you can just type GET_SAVE(ch, 2) now. I
would also guess that there are defines for the numbers of each saving
throw also. like #define SAVE_FIRE 2. Then you could use GET_SAVE(ch,
SAVE_FIRE). This more than likely isn't exact but it's the general idea.
Hope it helps.


     | Ensure that you have read the CircleMUD Mailing List FAQ:  |
     | |

This archive was generated by hypermail 2b30 : 12/08/00 PST