warning 219: local variable "label" shadows a va
#1

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.
Reply
#2

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;
        }
Reply
#3

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
Reply
#4

PHP код:
if(AccInfo[playerid][Level] >= 4)
    {
        new 
Text3D:serv1 Create3DTextLabel("Server Leader"COLOR_PINK30.040.050.040.00);
        
Attach3DTextLabelToPlayer(serv1playerid0.00.00.7);
        return 
1;
        } 
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)