SA-MP Forums Archive
What does this mean? - 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)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: What does this mean? (/showthread.php?tid=151597)



What does this mean? - Ihsan_Cingisiz - 31.05.2010

C:\Users\mehmet\Desktop\SA-MP Server\gamemodes\[GM]Navi-RP.pwn(217) : warning 219: local variable "pLabelCreated" shadows a variable at a preceding level


Re: What does this mean? - Grim_ - 31.05.2010

Means that variable has been twice.

For example, you might of created it globally than in a separate callback.


Re: What does this mean? - Babul - 31.05.2010

it tells you that you declared that variable twice.
Код:
1	new pLabelCreated[64];
2	for(id=0;id<MAX_PLAYERS;id++)
3	{
4		new pLabelCreated[64];
5		format(pLabelCreated,sizeof(pLabelCreated),"blablabla %s",pLabelCreated);
6		SendClientMessageToPlayer(id,0xffffffff,pLabelCreated);
7	}
just remove your new created variable (here, in line 4), as it already exists. if its a string, like above, then make sure the size is declared to the bigger value...


Re: What does this mean? - Grim_ - 31.05.2010

What are you talking about a bigger value of the string size?

And I doubt he'd put two of the same created variables right by each other like that. He probably created one as a global variable, and then one inside a callback/function.


Re: What does this mean? - Ihsan_Cingisiz - 31.05.2010

Quote:
Originally Posted by Babul
it tells you that you declared that variable twice.
Код:
1	new pLabelCreated[64];
2	for(id=0;id<MAX_PLAYERS;id++)
3	{
4		new pLabelCreated[64];
5		format(pLabelCreated,sizeof(pLabelCreated),"blablabla %s",pLabelCreated);
6		SendClientMessageToPlayer(id,0xffffffff,pLabelCreated);
7	}
just remove your new created variable (here, in line 4), as it already exists. if its a string, like above, then make sure the size is declared to the bigger value...
Oh thanks, i see, i have make new PLabelCreated 2 times.. :S