31.10.2018, 11:09
Hi.
Recently, I updated the compiler to the latest version.
Suddenly, there were such errors:
I have it at the top of the code:
What's wrong with that?
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;
}
Code:
forward bool:IsStringValid(string[]);

