warning 214...
#1

Hi.

Recently, I updated the compiler to the latest version.
Suddenly, there were such errors:

Code:
warning 214: possibly a "const" array argument was intended: "text"
warning 214: possibly a "const" array argument was intended: "string"
Code:
stock bool:IsStringValid(string[])
{
    new num;
    new len = strlen(string);
    for(new i; i < len; i++)
        switch(string[i])
        {
            case 'A'..'Z':num++;
            case 'a'..'z':num++;
            case '0'..'9':num++;
        }
    if(num == len) return true;
    else return false;
}
Code:
stock SendClientMessageInRange(playerid, color, Float:range, text[])
{
	new Float:x, Float:y, Float:z;
	GetPlayerPos(playerid, x, y, z);
	foreach(new i : Player)
	{
		if(IsPlayerConnected(i))
		{
			if(IsPlayerInRangeOfPoint(i, range, x, y, z))
			{
				SendClientMessage(i, color, text);
			}
		}
	}
	return 1;
}
I have it at the top of the code:

Code:
forward bool:IsStringValid(string[]);
What's wrong with that?
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)