Re: char_player_data problem, again...

From: Emil Nilimaa (kyos_overlord@hotmail.com)
Date: 09/24/99


ok,
more info here :)

Lets say i wanted to add a "title" or description for the character.
so it is like:

Character "with a big nose" "title" stands here.
------------------------------------------------------------
Now i did exactly like the old title.. but named it
desca.   so "with a big nose" is desca.

This works perfect until i try to use any olc command,
medit, redit, oedit, or zedit.

what i did was added desca to structs.h (and alot of other stuff on
other places but the problem seems to be in char_player_data)
I also tried to add the afk snippet from ceramic mouse, which
resulted
in same thing. Using olc crashed the game. The afk snippet also
added to char_player_data.

this is how it looks after adding desca:

struct char_player_data {
   char passwd[MAX_PWD_LENGTH+1];
   char *name;
   char *short_descr;
   char *long_descr;
   char *description;
   char *title;
   char *descb;
   char *descc;
   char *desca;         <-------- this is what i added.
   byte sex;
   byte chclass;
   byte race;
   byte subrace;
   byte eyecolor;
   byte level;
   int  hometown;
   struct time_data time;
   ubyte weight;
   ubyte height;
};

You see here that i have added descb and descc before, they work
the same as desca, but this does not crash the game when using olc.
When adding the afk snippet desca is changed for something else,
but it too crashes the game.
If i just use the code that works perfect, and just add desca like
above,
and change nothing else anywhere. Using the olc crashes the game.

It looks as if whatever i add up there, will crash the game when
using the
olc.
Is there a limit for how much you can add to struct
char_player_data?
Or does that effect the olc somehow?
shrug

Here is the output i get from gdb:

Program terminated with signal 11, segmentation fault.

#0 do_oasis (ch=0x82e2f70, argument=0xbffff891 "", cmd=205, subcmd=0)
   at oasis.c:148
oasis.c:148: No such file or directory.
#1 0x808a2ba in command_interpreter (ch=0x82e2f70,
   argument=0xbffff88c "redit") at interpreter.c:755
#2 0x80711ab in game_loop (mother_desc=3) at comm.c:734
#3 0x8070848 in init_game (port=4000) at comm.c356
#4 0x80707c5 in main (argc=3, argv=0xbffffc14) at comm.c:320
#5 0x4005ecb3 in __libc_start_main (main=0x8070560 <main>, argc=3,
   argv=0xbffffc14, init=0x8048fe0 <_init>, fini=0x80a94ac <_fini>,
   rtld_fini=0x4000a350 <_dl_fini>, stack_end=0xbffffc0c)
   at ../sysdeps/generic/libc-start.c:78

list gives:

oasis.c:143: No such file or directory.


shrug.
/kyos



______________________________________________________
Get Your Private, Free Email at http://www.hotmail.com


     +------------------------------------------------------------+
     | 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 : 12/15/00 PST