Ack. I added a new sh_int to the interp.c table called term.  Then, after
the FOUND loop in void interpret, which checks if a command is there and
accessible according to trust, i added:

if ( cmd_table[cmd].term = 0 )
      {
        sprintf(buf,"edm: terminal command not found\n\r");
        send_to_char(buf,ch);
        return;
      }
0 is not a terminal command.  1 is a terminal command.  And i added all the
term sh_int's to the table.. And when I compile, it compiles, but i get the
following error:

interp.c: In function `interpret':
interp.c:488: warning: assignment of read-only member `term'
interp.c:488: warning: suggest parentheses around assignment used as truth
value
interp.c:522: warning: suggest explicit braces to avoid ambiguous `else'
rm -f rom
gcc -O -g -lcrypt -o rom act_comm.o act_enter.o act_info.o act_move.o
act_obj.o act_wiz.o alias.o ban.o comm.o const.o db.o db2.o effects.o
fight.o flags.o handler.o healer.o interp.o note.o lookup.o magic.o magic2.o
music.o recycle.o save.o scan.o skills.o special.o tables.o update.o
mob_cmds.o mob_prog.o olc.o olc_act.o olc_save.o bit.o mem.o string.o
olc_mpcode.o hedit.o home.o -lcrypt

Do I have to put it in a loop like the FOUND loop above it?
( the found loop is the following:
 /*
     * Look for command in command table.
     */
    found = FALSE;
    trust = get_trust( ch );
    for ( cmd = 0; cmd_table[cmd].name[0] != '\0'; cmd++ )
    {
        if ( command[0] == cmd_table[cmd].name[0]
        &&   !str_prefix( command, cmd_table[cmd].name )
        &&   cmd_table[cmd].level <= trust )
        {
            found = TRUE;
            break;
        }
    }
Would I have to do something like this?? )
If someone could help me out with this, that would be great, along with the
clear screen thing i posted earlier.
-tarian


Reply via email to