Thanks to Nick Gammon (or how should I refer to you?), I got the executable to output into the area folder. Now, I have yet another question, but this time it concerns the actual pinfo function. Right now, I have:
//Command for getting player info
void do_pinfo(CHAR_DATA * ch, char *argument)
{
CHAR_DATA *victim;
if (IS_NPC(ch))
{
ch_printf(ch, "\n\r NPC's don't have Player Infos\n\r");
return;
}
set_char_color(AT_SCORE, ch);
send_to_char("+--------------------------------------------------------------------------+\n\r", ch);
ch_printf(ch,"|Name: %s |\n\r", victim->name );
/*ch_printf(ch,"|Gender: %s |\n\r", victim->sex );
ch_printf(ch,"|Age: %s |\n\r", get_age(victim) );
ch_printf(ch,"|Align: %s |\n\r", victim->alignment );
send_to_char("+--------------------------------------------------------------------------+\n\r", ch);
*/// ch_printf(ch,"|Personality: %s |\n\r", victim->personality );
// send_to_char("+--------------------------------------------------------------------------+\n\r", ch);
/* ch_printf(ch,"|History: %s |\n\r", victim->history );
send_to_char("+--------------------------------------------------------------------------+\n\r", ch);
ch_printf(ch,"|Position: ");
switch (ch->position)
{
case POS_DEAD:
ch_printf(ch, "%s is slowly decomposing. |", victim->name );
break;
case POS_MORTAL:
ch_printf(ch,"%s is mortally wounded. |", victim->name );
break;
case POS_INCAP:
ch_printf(ch,"%s is incapacitated. |", victim->name );
break;
case POS_STUNNED:
ch_printf(ch,"%s is stunned. |", victim->name );
break;
case POS_SLEEPING:
ch_printf(ch,"%s is sleeping. |", victim->name );
break;
case POS_RESTING:
ch_printf(ch,"%s is resting. |", victim->name );
break;
case POS_STANDING:
ch_printf(ch,"%s is standing. |", victim->name );
break;
case POS_FIGHTING:
ch_printf(ch,"%s is fighting. |", victim->name );
break;
case POS_MOUNTED:
ch_printf(ch,"%s is fighting. |", victim->name );
break;
case POS_SITTING:
ch_printf(ch,"%s is sitting. |", victim->name );
break;
}*/
send_to_char("+--------------------------------------------------------------------------+\n\r", ch);
send_to_char("\n\r", ch);
return;
}
If you notice, there's quite a bit commented out. I was trying to find what was wrong with it, and apparently the flaw is when the function first makes a reference to the "victim"'s name variable. If I run the swr file and type in "pinfo," the MUD crashes and says something about transferring data to swr.exe.stackdump. That file's contents after the crash are as follows:
Exception: STATUS_ACCESS_VIOLATION at eip=004D4AC4
eax=00000000 ebx=00000000 ecx=0A10C1C8 edx=0A10C1C8 esi=00000000 edi=00552C20
ebp=0022EC88 esp=0022EC70 program=C:\Cygwin\home\Hailey\swrmin\dist\area\swr.exe
cs=001B ds=0023 es=0023 fs=003B gs=0000 ss=0023
Stack trace:
Frame Function Args
0022EC88 004D4AC4 (0A10D7C0, 0022F955, 0A10DCF0, 0022F0F0)
0022F8F8 004A6934 (0A10D7C0, 0022F955, 0022F7F4, 0022F7F4)
0022FD68 00470D86 (0056C1B0, 00000000, 00000066, 77E7A730)
0022FDA0 0046FF26 (00000001, 0A041E68, 0A040328, 00000005)
0022FF40 61007408 (610D1F58, FFFFFFFE, 0000001C, 610D1E7C)
0022FF90 610076ED (00000000, 00000000, 00000001, 00000000)
0022FFB0 00552572 (0046FB88, 037F0009, 0022FFF0, 77E814C7)
0022FFC0 0040103C (70A71A29, 80000002, 7FFDF000, EEB86CF0)
0022FFF0 77E814C7 (00401000, 00000000, 78746341, 00000020)
End of stack trace |