warning 214... - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: warning 214... (
/showthread.php?tid=660329)
warning 214... -
Michatex - 31.10.2018
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?