warning 219: local variable "label" shadows a va - 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 219: local variable "label" shadows a va (
/showthread.php?tid=451307)
warning 219: local variable "label" shadows a va -
Saleem - 16.07.2013
have this warning on this cmd
this is baed on public OnPlayerSpawn(playerid)
Код:
if(AccInfo[playerid][Level] >= 4)
{
new Text3D:label = Create3DTextLabel("Server Leader", COLOR_PINK, 30.0, 40.0, 50.0, 40.0, 0);
Attach3DTextLabelToPlayer(label, playerid, 0.0, 0.0, 0.7);
return 1;
}
Код:
D:\Others\101SSCAM\samp03x_svr_R1-2_win32\filterscripts\spsa.pwn(840) : warning 219: local variable "label" shadows a variable at a preceding level
Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase
1 Warning.
Re: warning 219: local variable "label" shadows a va -
IceBilizard - 16.07.2013
Its not error its warning it means you already using label word at another place in the script
just change it to label2
pawn Код:
if(AccInfo[playerid][Level] >= 4)
{
new Text3D:label2 = Create3DTextLabel("Server Leader", COLOR_PINK, 30.0, 40.0, 50.0, 40.0, 0);
Attach3DTextLabelToPlayer(label2, playerid, 0.0, 0.0, 0.7);
return 1;
}
Re: warning 219: local variable "label" shadows a va -
Saleem - 16.07.2013
Quote:
Originally Posted by IceBilizard
Its not error its warning it means you already using label word at another place in the script
just change it to label2
pawn Код:
if(AccInfo[playerid][Level] >= 4) { new Text3D:label2 = Create3DTextLabel("Server Leader", COLOR_PINK, 30.0, 40.0, 50.0, 40.0, 0); Attach3DTextLabelToPlayer(label2, playerid, 0.0, 0.0, 0.7); return 1; }
|
i tryed i rename it but onplayerspawn Label not showing
Re: warning 219: local variable "label" shadows a va -
ThePhenix - 16.07.2013
PHP код:
if(AccInfo[playerid][Level] >= 4)
{
new Text3D:serv1 = Create3DTextLabel("Server Leader", COLOR_PINK, 30.0, 40.0, 50.0, 40.0, 0);
Attach3DTextLabelToPlayer(serv1, playerid, 0.0, 0.0, 0.7);
return 1;
}