22 Feb, 2009, boblinski wrote in the 21st comment:
Votes: 0
Okay, the Ignore system is now working perfectly, only problem is… when I log in some characters-

Cgywin shows:
Quote
Mon Feb 23 09:35:30 2009 :: ROM is ready to rock on port 9999 (0.0.0.0).
Mon Feb 23 09:35:38 2009 :: Sock.sinaddr: 127.0.0.1
Mon Feb 23 09:35:39 2009 :: Loading Bob.
Mon Feb 23 09:35:39 2009 :: [*****] BUG: Fread_char: no match.
Mon Feb 23 09:35:39 2009 :: [*****] BUG: Ignore

Mon Feb 23 09:35:40 2009 :: Bob@localhost has connected.
22 Feb, 2009, Sharmair wrote in the 22nd comment:
Votes: 0
Normally you get that type of bug when you remove something from the loading
code and the file still has the data. I would check to make sure you did not
remove the ignore loading code (or use an older code file). But if the ignore is
in fact loading, you might have not set the fMatch to TRUE so it still thinks it
has not found a valid option on the line when it really has.

Looking at the code you quoted in your first post, it looks like it is correct there.
One other thing you can do is check if after this player logs in, are the ignores
they had from before still on the character. If not, the ignore loading is not
working, my best guess in that case is your loading code uses cases on the first
letter and you put the ignore load code in the wrong case (like when it said to
put it before the id line, you also put it before a case 'I': line - BTW, it can just
as well be after id, the order in the case is not that important but it HAS to be
in the proper case block).
22 Feb, 2009, boblinski wrote in the 23rd comment:
Votes: 0
case 'I':
if (!str_cmp( word, "Ignore"))
{
if (count >= MAX_IGNORE)
{
fread_to_eol(fp);
fMatch = TRUE;
break;
}

ch->pcdata->ignore[count] = fread_string(fp);
count++;
break;
}

KEY ("Id", ch->id, fread_number (fp));


Is this the part you're talking about? Thats what I have there right now..

Would it fix things if I made it -clear- all the ignores when a char logs off?
22 Feb, 2009, Sharmair wrote in the 24th comment:
Votes: 0
boblinski said:
case 'I':
if (!str_cmp( word, "Ignore"))
{
if (count >= MAX_IGNORE)
{
fread_to_eol(fp);
fMatch = TRUE;
break;
}

ch->pcdata->ignore[count] = fread_string(fp);
count++;
break;
}

KEY ("Id", ch->id, fread_number (fp));


Is this the part you're talking about? Thats what I have there right now..

Would it fix things if I made it -clear- all the ignores when a char logs off?

The problem is you forgot to put the fMatch = TRUE; line in for when it sets the ignore.
If you wanted to not save ignores, you could get rid of all the loading and saving
code for ignore, but the snippet really intended ignores to save. I would not change
the saving based on just a bug fix though.

Yes. this is the part of the code I was referring to, here it is fixed and using decent
indentation:
case 'I':
if(!str_cmp(word, "Ignore")){
if(count >= MAX_IGNORE){
fread_to_eol(fp);
fMatch = TRUE;
break;
}
ch->pcdata->ignore[count] = fread_string(fp);
++count;
fMatch = TRUE;
break;
}
KEY ("Id", ch->id, fread_number (fp));
20.0/24