Hi list, I have been working on a player information (how active/inactive theyve been) function. Using a snippet from mudmagic, I have made it show me players in three rows. I also have it doing this

Hope          81  days  Horrendus     56  days  Hospiria      69  days
Imah          95  days
Would you like to delete Imah?
Player not deleted.

The problem is, it does not ask for my wait for my input... it for some reason assumes i type nothing and finishes the function. So my question is, how do I get the code to wait for "Yes" or "No" before continu-ing through. here is some of the snippet.

if ( fImmortal )
{
/* Dont show anything for Imms */
stc("{x",ch);
}
else
if (days > 90) /* If the file is inactive for 90 days, ask to delete */
{
sprintf( buf, "%-13s %s%-3d{x days{x\n\r",
 ep->d_name, "{R", days );
stc(buf,ch);
/* The big question /*
sprintf( buf, "Would you like to delete %s?{x\n\r", ep->d_name );
stc(buf,ch);
/* Broken Piece o.... This is where it doesnt let me do anything, any advice? */
if (argument[0] == '\0' || UPPER(argument[0]) == 'No')
 {
 stc("Player not deleted.\n\r",ch);
/* ??? If i do this, i dont think it will continue through the directory... */
 return;
 }
/*havent got this far */
if (UPPER(argument[0]) == 'Y' )
{
sprintf(buf,"%s deleted.", ep->d_name);
stc(buf,ch);
sprintf(buf,"%s/%s", PLAYER_DIR, ep->d_name);
unlink(buf);
sprintf(buf,"%s deleted.", ep->d_name);
stc(buf,ch);
}
}
else

   sprintf( buf, "%-13s %s%-3d{x days{x\t",
ep->d_name, days > 30 ? "{r" : days > 20 ? "{Y" : days > 10 ? "{g" : "{G", days );
 send_to_char(buf, ch);
               col++;
               if (col==3)
               {
                 send_to_char("\n\r",ch);
                 col=0;
               }

If you'd like me to post the whole function, let me know

ATM!
Forgotten-Empire.no-ip.com:9000


Reply via email to