warning with string
#1

warnning:
Код:
local variable "string" shadows a variable at a preceding level
in this code:
Код:
new string[256];
new playername[250];
GetPlayerName(playerid,playername,sizeof(playername));
format(string, sizeof(string), "[/MENIU]: %s work in police, if you want too, use: /meniu", playername);
SendClientMessageToAll(COLOR_ORANGE, string);
Reply
#2

That warning means you alerady created a variable called string, and it's a duplicate of it, just rename the string that you have that warning with.

E.g.

2 strings = new string[64];
= new string[25];

change one of them to something else.

so it would be:

new string[64];

new setstring[64];

if you get that warning, it could also be because it's a global var, and you are trying to reuse it.
Reply
#3

really thanks
Reply
#4

Quote:
Originally Posted by SpectroTek
really thanks
No problem.
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)