Код:
warning 219: local variable "str" shadows a variable at a preceding level
there is already new str or global str somewhere delete it.
Код:
error 017: undefined symbol "string"
you have just copy this part are not you?
pawn Код:
GetPlayerName(playerid, name, sizeof(name));
GetPlayerPos(playerid, X, Y, Z);
format(string, sizeof(string), "[Local IC] %s (%d) : %s", name, playerid, text[0]);
for(new i = 0; i < MAX_PLAYERS; ++i)
{
if(IsPlayerInRangeOfPoint(i, 5, X, Y, Z)) SendClientMessage(i, -1, string);
}
change the following to fix the problem, You must make global str with size of 128 to make this work.
change this
pawn Код:
format(string, sizeof(string), "[Local IC] %s (%d) : %s", name, playerid, text[0]);
to this
pawn Код:
format(str, sizeof(str), "[Local IC] %s (%d) : %s", name, playerid, text[0]);
change this
pawn Код:
if(IsPlayerInRangeOfPoint(i, 5, X, Y, Z)) SendClientMessage(i, -1, string);
to this
pawn Код:
if(IsPlayerInRangeOfPoint(i, 5, X, Y, Z)) SendClientMessage(i, -1, str);
if global str with size of 128 or whatever is already created or made you don't need to create a new one with the same size and name.