Re: [NEWBIE][CODE] Saving Player Stats

From: Jason Beeland (
Date: 03/14/01

> > db.c:2540:  ch-> = 25;
> > db.c:2541:  ch->real_abils.wis = 25;
> > db.c:2542:  ch->real_abils.dex = 25;
> > db.c:2543:  ch->real_abils.str = 25;
> > db.c:2545:  ch->real_abils.con = 25;
> > db.c:2546:  ch->real_abils.cha = 25;
> these define the stats of a god character(usually the first to log into the
> mud).

Nope, these are the default stats of the initialized
player structure.  You need to initialize the structure
before you try to assign values to the various members of
the structure.  What's happening is that you are setting
all the stats of the player, THEN initializing the struct
data, which is setting them all to 25's.  If you will go
and reread the init_char() function you will find that the
"if it's the first player" case is only setting their xp,
level, and hp/mana/move.  The rest of the function is var
inits to default stats.

Jason Beeland aka Veritus Silverun
"A realist is just a cynic who's usually right."

   | FAQ: |
   | Archives: |

This archive was generated by hypermail 2b30 : 12/04/01 PST