warning 219: local variable "Name" shadows a variable at a preceding level
#1

Code:
C:\Users\Nikola\Desktop\Papki\samp\gamemodes\Trucking1.pwn(3077) : warning 219: local variable "Name" shadows a variable at a preceding level
C:\Users\Nikola\Desktop\Papki\samp\gamemodes\Trucking1.pwn(3209) : warning 219: local variable "Name" shadows a variable at a preceding level
C:\Users\Nikola\Desktop\Papki\samp\gamemodes\Trucking1.pwn(3244) : warning 219: local variable "Name" shadows a variable at a preceding level
C:\Users\Nikola\Desktop\Papki\samp\gamemodes\Trucking1.pwn(3534) : warning 219: local variable "Name" shadows a variable at a preceding level
C:\Users\Nikola\Desktop\Papki\samp\gamemodes\Trucking1.pwn(3926) : warning 219: local variable "Name" shadows a variable at a preceding level
C:\Users\Nikola\Desktop\Papki\samp\gamemodes\Trucking1.pwn(4103) : warning 219: local variable "Name" shadows a variable at a preceding level
C:\Users\Nikola\Desktop\Papki\samp\gamemodes\Trucking1.pwn(4810) : warning 219: local variable "Name" shadows a variable at a preceding level
C:\Users\Nikola\Desktop\Papki\samp\gamemodes\Trucking1.pwn(4865) : warning 219: local variable "Name" shadows a variable at a preceding level
C:\Users\Nikola\Desktop\Papki\samp\gamemodes\Trucking1.pwn(4975) : warning 219: local variable "Name" shadows a variable at a preceding level
C:\Users\Nikola\Desktop\Papki\samp\gamemodes\Trucking1.pwn(5691) : warning 219: local variable "Name" shadows a variable at a preceding level
C:\Users\Nikola\Desktop\Papki\samp\gamemodes\Trucking1.pwn(5804) : warning 219: local variable "Name" shadows a variable at a preceding level
C:\Users\Nikola\Desktop\Papki\samp\gamemodes\Trucking1.pwn(5921) : warning 219: local variable "Name" shadows a variable at a preceding level
C:\Users\Nikola\Desktop\Papki\samp\gamemodes\Trucking1.pwn(6120) : warning 219: local variable "Name" shadows a variable at a preceding level
C:\Users\Nikola\Desktop\Papki\samp\gamemodes\Trucking1.pwn(6395) : warning 219: local variable "Name" shadows a variable at a preceding level
C:\Users\Nikola\Desktop\Papki\samp\gamemodes\Trucking1.pwn(6509) : warning 219: local variable "Name" shadows a variable at a preceding level
C:\Users\Nikola\Desktop\Papki\samp\gamemodes\Trucking1.pwn(6782) : warning 219: local variable "Name" shadows a variable at a preceding level
C:\Users\Nikola\Desktop\Papki\samp\gamemodes\Trucking1.pwn(7128) : warning 219: local variable "Name" shadows a variable at a preceding level
C:\Users\Nikola\Desktop\Papki\samp\gamemodes\Trucking1.pwn(7256) : warning 219: local variable "Name" shadows a variable at a preceding level
C:\Users\Nikola\Desktop\Papki\samp\gamemodes\Trucking1.pwn(7841) : warning 219: local variable "Name" shadows a variable at a preceding level
C:\Users\Nikola\Desktop\Papki\samp\gamemodes\Trucking1.pwn(8022) : warning 219: local variable "Name" shadows a variable at a preceding level
C:\Users\Nikola\Desktop\Papki\samp\gamemodes\Trucking1.pwn(8264) : warning 219: local variable "Name" shadows a variable at a preceding level
C:\Users\Nikola\Desktop\Papki\samp\gamemodes\Trucking1.pwn(8774) : warning 219: local variable "Name" shadows a variable at a preceding level
C:\Users\Nikola\Desktop\Papki\samp\gamemodes\Trucking1.pwn(8808) : warning 219: local variable "Name" shadows a variable at a preceding level
C:\Users\Nikola\Desktop\Papki\samp\gamemodes\Trucking1.pwn(9204) : warning 219: local variable "Name" shadows a variable at a preceding level
C:\Users\Nikola\Desktop\Papki\samp\gamemodes\Trucking1.pwn(9475) : warning 219: local variable "Name" shadows a variable at a preceding level
C:\Users\Nikola\Desktop\Papki\samp\gamemodes\Trucking1.pwn(10439) : warning 219: local variable "Name" shadows a variable at a preceding level
C:\Users\Nikola\Desktop\Papki\samp\gamemodes\Trucking1.pwn(11700) : warning 219: local variable "Name" shadows a variable at a preceding level
C:\Users\Nikola\Desktop\Papki\samp\gamemodes\Trucking1.pwn(11769) : warning 219: local variable "Name" shadows a variable at a preceding level
C:\Users\Nikola\Desktop\Papki\samp\gamemodes\Trucking1.pwn(12262) : warning 219: local variable "Name" shadows a variable at a preceding level
C:\Users\Nikola\Desktop\Papki\samp\gamemodes\Trucking1.pwn(12420) : warning 219: local variable "Name" shadows a variable at a preceding level
C:\Users\Nikola\Desktop\Papki\samp\gamemodes\Trucking1.pwn(12453) : warning 219: local variable "Name" shadows a variable at a preceding level
C:\Users\Nikola\Desktop\Papki\samp\gamemodes\Trucking1.pwn(13939) : warning 219: local variable "Name" shadows a variable at a preceding level
C:\Users\Nikola\Desktop\Papki\samp\gamemodes\Trucking1.pwn(13984) : warning 219: local variable "Name" shadows a variable at a preceding level
C:\Users\Nikola\Desktop\Papki\samp\gamemodes\Trucking1.pwn(14040) : warning 219: local variable "Name" shadows a variable at a preceding level
C:\Users\Nikola\Desktop\Papki\samp\gamemodes\Trucking1.pwn(14082) : warning 219: local variable "Name" shadows a variable at a preceding level
C:\Users\Nikola\Desktop\Papki\samp\gamemodes\Trucking1.pwn(14152) : warning 219: local variable "Name" shadows a variable at a preceding level
C:\Users\Nikola\Desktop\Papki\samp\gamemodes\Trucking1.pwn(14486) : warning 219: local variable "Name" shadows a variable at a preceding level
C:\Users\Nikola\Desktop\Papki\samp\gamemodes\Trucking1.pwn(14591) : warning 219: local variable "Name" shadows a variable at a preceding level
C:\Users\Nikola\Desktop\Papki\samp\gamemodes\Trucking1.pwn(14998) : warning 219: local variable "Name" shadows a variable at a preceding level
C:\Users\Nikola\Desktop\Papki\samp\gamemodes\Trucking1.pwn(15067) : warning 219: local variable "Name" shadows a variable at a preceding level
C:\Users\Nikola\Desktop\Papki\samp\gamemodes\Trucking1.pwn(15234) : warning 219: local variable "Name" shadows a variable at a preceding level
C:\Users\Nikola\Desktop\Papki\samp\gamemodes\Trucking1.pwn(15277) : warning 219: local variable "Name" shadows a variable at a preceding level
C:\Users\Nikola\Desktop\Papki\samp\gamemodes\Trucking1.pwn(15550) : warning 219: local variable "Name" shadows a variable at a preceding level
C:\Users\Nikola\Desktop\Papki\samp\gamemodes\Trucking1.pwn(15660) : warning 219: local variable "Name" shadows a variable at a preceding level
C:\Users\Nikola\Desktop\Papki\samp\gamemodes\Trucking1.pwn(15756) : warning 219: local variable "Name" shadows a variable at a preceding level
C:\Users\Nikola\Desktop\Papki\samp\gamemodes\Trucking1.pwn(16124) : warning 219: local variable "Name" shadows a variable at a preceding level
C:\Users\Nikola\Desktop\Papki\samp\gamemodes\Trucking1.pwn(16173) : warning 219: local variable "Name" shadows a variable at a preceding level
C:\Users\Nikola\Desktop\Papki\samp\gamemodes\Trucking1.pwn(16222) : warning 219: local variable "Name" shadows a variable at a preceding level
C:\Users\Nikola\Desktop\Papki\samp\gamemodes\Trucking1.pwn(16269) : warning 219: local variable "Name" shadows a variable at a preceding level
C:\Users\Nikola\Desktop\Papki\samp\gamemodes\Trucking1.pwn(16320) : warning 219: local variable "Name" shadows a variable at a preceding level
C:\Users\Nikola\Desktop\Papki\samp\gamemodes\Trucking1.pwn(16454) : warning 219: local variable "Name" shadows a variable at a preceding level
C:\Users\Nikola\Desktop\Papki\samp\gamemodes\Trucking1.pwn(16507) : warning 219: local variable "Name" shadows a variable at a preceding level
C:\Users\Nikola\Desktop\Papki\samp\gamemodes\Trucking1.pwn(16548) : warning 219: local variable "Name" shadows a variable at a preceding level
C:\Users\Nikola\Desktop\Papki\samp\gamemodes\Trucking1.pwn(16595) : warning 219: local variable "Name" shadows a variable at a preceding level
C:\Users\Nikola\Desktop\Papki\samp\gamemodes\Trucking1.pwn(16774) : warning 219: local variable "Name" shadows a variable at a preceding level
C:\Users\Nikola\Desktop\Papki\samp\gamemodes\Trucking1.pwn(16851) : warning 219: local variable "Name" shadows a variable at a preceding level
C:\Users\Nikola\Desktop\Papki\samp\gamemodes\Trucking1.pwn(16938) : warning 219: local variable "Name" shadows a variable at a preceding level
C:\Users\Nikola\Desktop\Papki\samp\gamemodes\Trucking1.pwn(17029) : warning 219: local variable "Name" shadows a variable at a preceding level
C:\Users\Nikola\Desktop\Papki\samp\gamemodes\Trucking1.pwn(17149) : warning 219: local variable "Name" shadows a variable at a preceding level
C:\Users\Nikola\Desktop\Papki\samp\gamemodes\Trucking1.pwn(17198) : warning 219: local variable "Name" shadows a variable at a preceding level
C:\Users\Nikola\Desktop\Papki\samp\gamemodes\Trucking1.pwn(17258) : warning 219: local variable "Name" shadows a variable at a preceding level
C:\Users\Nikola\Desktop\Papki\samp\gamemodes\Trucking1.pwn(17308) : warning 219: local variable "Name" shadows a variable at a preceding level
C:\Users\Nikola\Desktop\Papki\samp\gamemodes\Trucking1.pwn(17884) : warning 219: local variable "Name" shadows a variable at a preceding level
C:\Users\Nikola\Desktop\Papki\samp\gamemodes\Trucking1.pwn(18211) : warning 219: local variable "Name" shadows a variable at a preceding level
C:\Users\Nikola\Desktop\Papki\samp\gamemodes\Trucking1.pwn(18287) : warning 219: local variable "Name" shadows a variable at a preceding level
C:\Users\Nikola\Desktop\Papki\samp\gamemodes\Trucking1.pwn(18350) : warning 219: local variable "Name" shadows a variable at a preceding level
C:\Users\Nikola\Desktop\Papki\samp\gamemodes\Trucking1.pwn(18422) : warning 219: local variable "Name" shadows a variable at a preceding level
C:\Users\Nikola\Desktop\Papki\samp\gamemodes\Trucking1.pwn(19585) : warning 219: local variable "Name" shadows a variable at a preceding level
C:\Users\Nikola\Desktop\Papki\samp\gamemodes\Trucking1.pwn(19710) : warning 219: local variable "Name" shadows a variable at a preceding level
C:\Users\Nikola\Desktop\Papki\samp\gamemodes\Trucking1.pwn(19964) : warning 219: local variable "Name" shadows a variable at a preceding level
C:\Users\Nikola\Desktop\Papki\samp\gamemodes\Trucking1.pwn(20341) : warning 219: local variable "Name" shadows a variable at a preceding level
C:\Users\Nikola\Desktop\Papki\samp\gamemodes\Trucking1.pwn(20673) : warning 219: local variable "Name" shadows a variable at a preceding level
C:\Users\Nikola\Desktop\Papki\samp\gamemodes\Trucking1.pwn(20981) : warning 217: loose indentation
Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


73 Warnings.
Help me please!
Reply
#2

post code from line 20660 > 20673
Reply
#3

You have a local variable called "Name" but there's also a global variable called that in your script or in some include.
Reply
#4

Quote:
Originally Posted by DaTa[X]
View Post
post code from line 20660 > 20673
Code:
		    HouseFile_Save(HouseID);
		}
	}

	return 1;
}



// This callback gets called when the player changes state
public OnPlayerStateChange(playerid,newstate,oldstate)
{
	// Setup local variables
	new vid, Name[24], Msg[128], engine, lights, alarm, doors, bonnet, boot, objective;
Reply
#5

pawn Code:
new vid, Name[24], Msg[128], engine, lights, alarm, doors, bonnet, boot, objective;
Change this name to Name1[24] or something else, And change it in your script (Only where you use it 'OnPlayerStateChange' ..
Reply
#6

I fixed all those warning ty btw, and now i got 1 more warning and it is

Code:
C:\Users\Nikola\Desktop\Papki\samp\gamemodes\Trucking1.pwn(20985) : warning 217: loose indentation
Line 20985
Code:
pInfo[id][vStatus] = level;
Reply
#7

Show us all the code where pInfo[id] is, else we can't fix
Reply
#8

Code:
new pInfo[MAX_PLAYERS][TPlayerData];
stock Name(playerid)
{
	new Name[128]
    GetPlayerName(playerid, Name, 128);
    return name;
}
stock VIPName(playerid)
{
    new vipname[128];
    switch(pInfo[playerid][vStatus])
    {
        case 0: vipname= "Normal";
        case 2: vipname= "Bronze V.I.P";
        case 3: vipname= "Silver V.I.P";
        case 4: vipname= "Gold V.I.P";
    }
    return vipname;
}
COMMAND:makevip(playerid, params[])
{
    if(IsPlayerConnected(playerid))
		{
			if(APlayerData[playerid][PlayerLevel] >= 5)
			{
			    new id, level, n[MAX_PLAYER_NAME], string[126];
			    if(sscanf(params, "ud", id, level))
					return SendClientMessage(playerid, -1, "USAGE: /makevip [playerid] [level]");
					
					pInfo[id][vStatus] = level;
					
					format(string, sizeof(string), "%s has set your VIP level %d", n, level);
					SendClientMessage(id, -1, string);

			        format(string, sizeof(string), "You have set %s VIP level to %d", playerid, level);
					SendClientMessage(playerid, -1, string);
   			}
		}
	return 1;
}
There
Reply
#9

pawn Code:
COMMAND:makevip(playerid, params[])
{
    if(IsPlayerConnected(playerid))
    {
        if(APlayerData[playerid][PlayerLevel] >= 5)
        {
            new id, level, n[MAX_PLAYER_NAME], string[126];
            if(sscanf(params, "ud", id, level))
            return SendClientMessage(playerid, -1, "USAGE: /makevip [playerid] [level]");

            pInfo[id][vStatus] = level;

            format(string, sizeof(string), "%s has set your VIP level %d", n, level);
            SendClientMessage(id, -1, string);

            format(string, sizeof(string), "You have set %s VIP level to %d", playerid, level);
            SendClientMessage(playerid, -1, string);
        }
    }
    return 1;
}
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)