06.02.2012, 23:55
I have this define:
and I'm trying to count the number of \n's and increase the number of the variable according to it like so:
What am I doing wrong?
pawn Код:
#define DIALOG_TEXT_REASONS "Cheaters\nHi\nHl\nHel\nHi"
/*
Edit this string with your available reasons to kick a player.
Put \n between reasons.
Example: Cheating\nFlaming would display: Cheating
Flaming
*/
pawn Код:
new lines = 0;
for( new i; i < 255; i++)
{
if(strfind(DIALOG_TEXT_REASONS, "\n", true) != -1) { lines++; }
printf("lines: %d", lines);
}