I am cleaning up the output look on wiznet
it works fine accept when i put in a get_trust check
however the check works all the way up to flag:

#define WIZ_RESTORE             (P) <-- this flag works
#define WIZ_LOAD                (Q) <--- Bugs out here

GDB Output

#0  0x8065fa2 in do_wizchan (ch=0x40608958, argument=0x40607ef4 "")
    at act_wiz.c:409
409        if (wiznet_table[WIZ_LOGS].level <= get_trust(ch))
(gdb) backtrace
#0  0x8065fa2 in do_wizchan (ch=0x40608958, argument=0x40607ef4 "")
    at act_wiz.c:409
#1  0x808cfba in interpret (ch=0x40608958, argument=0x40607ef4 "")
    at interp.c:682
#2  0x807163c in substitute_alias (d=0x40607ad0, argument=0x40607eed
"wizchan")
    at alias.c:97
#3  0x80727d1 in game_loop_unix (control=4) at comm.c:852
#4  0x8072364 in main (argc=4, argv=0xbffffca4) at comm.c:436

code below:

 ********This Works *******

    send_to_char("                RESTORE: {R[",ch);

   if (wiznet_table[WIZ_RESTORE].level <= get_trust(ch))
   {
    if (IS_SET(ch->wiznet,WIZ_RESTORE))
      send_to_char("{W*{R]{w           ||\n\r",ch);
    else
      send_to_char(" ]{w           ||\n\r",ch);
   }
   else
      send_to_char("{W-{R]{w           ||\n\r",ch);


  ******Bugs Out Here *********

    send_to_char("  ||           LOAD: {R[",ch);

   if (wiznet_table[WIZ_LOAD].level <= get_trust(ch))
   {
    if (IS_SET(ch->wiznet,WIZ_LOAD))
      send_to_char("{W*{R]{w",ch);
    else
      send_to_char(" ]{w",ch);
   }
   else
   send_to_char("{W-{R]{w",ch);


If i write it without the check it all works...
Example without the check:

    if (IS_SET(ch->wiznet,WIZ_LOAD))
      send_to_char("{W*{R]{w",ch);
    else
      send_to_char(" ]{w",ch);


Reply via email to