package delivery code

Posted by Mixoplix on Wed 14 Aug 2002 09:45 PM — 2 posts, 11,078 views.

#0
Another stupid declaration problem...Thanks for all your help btw Nick, I really appreciate your swift responses. Anyways here is a new problem for ya:

I'm getting this error with this code.

'Player' undeclared (first use in this function)

here is the code:

if (ch->level > 1)
{
char motdbuf[MAX_STRING_LENGTH];
FILE *fp;

sprintf( motdbuf, "%s%s", MAIL_DIR, capitalize( ch->name ) );
if ( ( fp = fopen( motdbuf, "r" ) ) != NULL )
{
xSET_BIT(ch->act, PLR_GOTMAIL);
fclose(fp);
}
}

All that I can come up with is the %s%s is the directed 'player' declaration. As I don't have the word "player" anywhere. Where would I declare something like this?

Thanks, Mix
Australia Forum Administrator #1
I gather this is non-standard SMAUG, because I can't find PLR_GOTMAIL.

Probably PLR_GOTMAIL is a define which incorporates the word player. eg. (just guessing)

#define PLR_GOTMAIL (player->mail & 1)