Ah, now I see. You know, this is what happens when I write code directly into an answer and you copy it without understanding what it does.
There are two problems. First off, I asked you to add the second log lines a line too low, it needs to be immediaely following the first log() or it breaks the logic of the function.
Secondly, the comma should have been a semicolon at the end there. Like this:
Code:
+ log("Wearoff: char: %s, af->spell: %d, wear_off_msg: %s", GET_NAME(i), af->spell, spell_info[af->spell].wear_off_msg);
+ log("((%d > 0) && (%d <= %d)): %d, second check: %d",
af->spell, af->spell, MAX_SPELLS, ((af->spell > 0) && (af->spell <= MAX_SPELLS)));
if ((af->spell > 0) && (af->spell <= MAX_SPELLS))
if (!af->next || (af->next->spell != af->spell) ||
(af->next->duration > 0))
if (spell_info[af->spell].wear_off_msg)
send_to_char(i, "%s\r\n", spell_info[af->spell].wear_off_msg);
affect_remove(i, af);