has anyone ever gone over 374 commands in cmdedit?
if i add another command it nulls 3 commands
add another and it goes all the way down to 90 commands.
i was going to rewrite the whole thing but if i can save time
buy posting it here and if this is a repost im sorry. whats the
archives url link?

ofcourse MAX_CMD is returned int.
it plays with some wierd malloc buffering on how it actualy adds a command
to the comandos file. set it to TYP_NUL define it in tables.c and it goes
in ok. anything else TYP_WHATEVER nulls the damn thing. im wondering if i
should just declare MAX_CMD ### but i look at the code and i can see
lvalue errors out the yeng yang. ive actualy took the cmdeditor from
olc2.01 and put it in with olc1.81 everything has worked perfectly until
now.

Code you ask? ill just Grep MAX_CMD it basicly speaks for itself.
grep "MAX_CMD" *.c
cmdedit.c:int                   MAX_CMD;
cmdedit.c:      for ( i = 0; i < MAX_CMD; ++i )
cmdedit.c:      MAX_CMD++;
cmdedit.c:      new_table = realloc (cmd_table, sizeof(struct cmd_type) *
(MAX_CMD + 1));
cmdedit.c:      cmd_table[MAX_CMD-1].name               = str_dup
(argument);
cmdedit.c:      cmd_table[MAX_CMD-1].do_fun             = do_nothing;
cmdedit.c:      cmd_table[MAX_CMD-1].position           = position_lookup(
"standing" );
cmdedit.c:      cmd_table[MAX_CMD-1].level              = MAX_LEVEL;
cmdedit.c:      cmd_table[MAX_CMD-1].log                = LOG_ALWAYS;
cmdedit.c:      cmd_table[MAX_CMD-1].show               = TYP_NUL;
cmdedit.c:      cmd_table[MAX_CMD].name                 = str_dup( "" );
cmdedit.c:      new_table = malloc (sizeof(struct cmd_type) * MAX_CMD);
cmdedit.c:      for (i = 0, j = 0; i < MAX_CMD+1; i++)
cmdedit.c:      MAX_CMD--; /* Important :() */
interp.c:int MAX_CMD;
interp.c:               for ( j = 0; j < MAX_CMD; ++j )
interp.c:       for ( i = 0; i < MAX_CMD; ++i )
interp.c:       new_cmd_table = malloc (sizeof(struct cmd_type) * (MAX_CMD
+ 1));
interp.c:       new_cmd_table[MAX_CMD].name = str_dup( "" );
tablesave.c:extern      int                     MAX_CMD;
tablesave.c:    MAX_CMD = largo;

largo is length in spainish

maybe one of you can grep MAX_CMD to see if i missed something and yes i
did define it as FIRST_BOOT anything else feel free to ask.
Thanks




Reply via email to