Structures for player data and variables within

From: Minturn.Del.PRC.Oceana (Del@PRCOceana.Corona.Navy.Mil)
Date: 03/20/00


The recent question on the understanding of (ch)->player.level
was directed to me personally. However I was not 100 percent sure
of my answer. (mostly terminology)

The basic question was why (ch)->player.level was just that, instead of
(ch)->level.

I had never researched it before, and myself being inexperienced with
structures, I followed the code through for this type of answer.

Can the more experienced put the right labels on my answer or better
explanation? or atleast let me know if my understanding is correct.

structs.h:

struct char_player_data {
<snip>
   byte level;         /* PC / NPC's level                     */
<snip>

struct char_data {
<snip>
   struct char_player_data player;       /* Normal data                   */
<snip>


NOTE: the variable name player.

It was hiding in there and if I read it right..

ch = char_data structure (in this scenerio)
player = char_player_data structure
level = the finial variable in the structure mess!


     +------------------------------------------------------------+
     | Ensure that you have read the CircleMUD Mailing List FAQ:  |
     |  http://qsilver.queensu.ca/~fletchra/Circle/list-faq.html  |
     +------------------------------------------------------------+



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