Warnings help
#1

(9164) : warning 219: local variable "string" shadows a variable at a preceding level
Код:
						if(GetPlayerVehicleID(playerid) == PlayerInfo[playerid][pPcarkey] || GetPlayerVehicleID(playerid) == PlayerInfo[playerid][pPcarkey2])
		                {
		                    GetPlayerName(playerid, sendername, sizeof(sendername));
		                    new ownvehkey;
		                    if(GetPlayerVehicleID(playerid) == PlayerInfo[playerid][pPcarkey]) { ownvehkey = PlayerInfo[playerid][pPcarkey]; }
		                    else if(GetPlayerVehicleID(playerid) == PlayerInfo[playerid][pPcarkey2]) { ownvehkey = PlayerInfo[playerid][pPcarkey2]; }
		                    else { return 1; }
		                    if(strcmp(sendername, CarInfo[ownvehkey][cOwner], true) == 0)
		                    {
		                        new carsellprice = CarInfo[ownvehkey][cValue] / 4 * 3;
		                        new Float:x,Float:y,Float:z;
		                        new Float:a;
		                        CarInfo[ownvehkey][cOwned] = 0;
		                        strmid(CarInfo[ownvehkey][cOwner], "Dealership", 0, strlen("Dealership"), 999);
		                        GivePlayerMoney(playerid,carsellprice);
		                        PlayerPlaySound(playerid, 1052, 0.0, 0.0, 0.0);
		                        new string[128];
								format(string, sizeof(string), "Go prodadovte vasiot avtomobil za %d.", carsellprice);
								SendClientMessage(playerid,COLOR_YELLOW,string);
		                        GetVehiclePos(ownvehkey, x, y, z);
		                        GetVehicleZAngle(ownvehkey, a);
		                        CarInfo[ownvehkey][cLocationx] = x;
		                        CarInfo[ownvehkey][cLocationy] = y;
		                        CarInfo[ownvehkey][cLocationz] = z;
		                        CarInfo[ownvehkey][cAngle] = a;
		                        if(GetPlayerVehicleID(playerid) == PlayerInfo[playerid][pPcarkey]) { PlayerInfo[playerid][pPcarkey] = 999; }
		                        else if(GetPlayerVehicleID(playerid) == PlayerInfo[playerid][pPcarkey2]) { PlayerInfo[playerid][pPcarkey2] = 999; }
		                        RemovePlayerFromVehicle(playerid);
		                        TogglePlayerControllable(playerid, 1);
		                        if(PlayerInfo[playerid][pLocal] == ownvehkey)
		                        {
		                            SetPlayerInterior(playerid,0);
		                            SetPlayerPos(playerid,CarInfo[ownvehkey][cLocationx],CarInfo[ownvehkey][cLocationy],CarInfo[ownvehkey][cLocationz]);
		                            PlayerInfo[playerid][pInt] = 0;
		                        }
		                        OnPropUpdate();
		                        OnPlayerUpdate(playerid);
		                        DestroyVehicle(ownvehkey);
								CreateVehicle(CarInfo[ownvehkey][cModel],CarInfo[ownvehkey][cLocationx],CarInfo[ownvehkey][cLocationy],CarInfo[ownvehkey][cLocationz]+1.0,CarInfo[ownvehkey][cAngle],CarInfo[ownvehkey][cColorOne],CarInfo[ownvehkey][cColorTwo],60000);
		                        return 1;
		                    }
		                }
warning here
Код:
new string[128];
(9886) : warning 213: tag mismatch
Код:
     	if(dialogid == DIALOG_FIRMA2)
	    {
		    if(!response) return 1;
			if(PlayerInfo[playerid][pPosedovanjeFirme2] == 0) return SCM(playerid,BELA, "{F81414}GRESKA:{FFFFFF} Nemate Biznis!");
			new i = PlayerInfo[playerid][pPosedovanjeFirme2];
			switch(listitem)
			{
				case 0:
				{
				 	if(!IsPlayerInRangeOfPoint(playerid, 15.0, FirmaInfo[i][fUlazX], FirmaInfo[i][fUlazY], FirmaInfo[i][fUlazZ])) return SCM(playerid,BELA,"{F81414}GRESKA:{FFFFFF} Ne ste kaj vasta Firma!");
			 		GivePlayerMoney(playerid,FirmaInfo[i][fCena]/2);
					FirmaInfo[i][fProveraVlasnika] = 0; FirmaInfo[i][fKasa] = 0;
					strmid(FirmaInfo[i][bVlasnik], "Niko", 0, strlen("Niko"), 255); PlayerInfo[playerid][pPosedovanjeFirme2] = 0;
					SacuvajFirme(i); FirmaLP(i); OnPlayerUpdate(playerid);
					format(string,sizeof(string),"{6EF83C}INFO:{FFFFFF}Ja prodadovte Firmata za{FFFFFF}$%d {00C0FF}!",FirmaInfo[i][fCena]);
					SCM(playerid,BELA,string);
				}
warning here
Код:
strmid(FirmaInfo[i][bVlasnik], "Niko", 0, strlen("Niko"), 255); PlayerInfo[playerid][pPosedovanjeFirme2] = 0;
(10449) : warning 202: number of arguments does not match definition
Код:
		if(dialogid == 9813)
		{
		 	if(response)
		    {
			        strval(inputtext);
					strmid(PlayerInfo[playerid][pEmail], inputtext, 0, strlen(inputtext), 225);
					format(string, sizeof(string), "{6EF83C}INFO:{FFFFFF}Go promenavte vasiot E-Mail vo %s.", inputtext);
					SendClientMessage(playerid, COLOR_WHITE, string);
					EmailDozvola[playerid] = 0;
					OnPlayerRegister(playerid);
			}
		}
warning here
Код:
OnPlayerRegister(playerid);
(12962) : warning 219: local variable "sendername" shadows a variable at a preceding level
Код:
 	if(dialogid == ZELBA)
	{
		if(!response) return 1;
		if(response)
		{
		     new result[128],sendername[MAX_PLAYER_NAME+1];
			 GetPlayerName(playerid, sendername, sizeof(sendername));
			 format(string, sizeof(string), "\nZelba | %s Saka: %s", sendername, (result));
			 ABroadCast(-1,string,1);
			 WishLog(string);
		}
 	}
warn here
Код:
new result[128],sendername[MAX_PLAYER_NAME+1];
Reply
#2

warning 219: local variable "string" shadows a variable at a preceding level
It means that you have something like:
pawn Код:
new result[128];
new result[128];//second one
So the solution is delete one of them...probably the second one.
Reply
#3

THANKS REPPED +++++
can u help me about this warnings ?
(9885) : warning 213: tag mismatch
Код:
     	if(dialogid == DIALOG_FIRMA2)
	    {
		    if(!response) return 1;
			if(PlayerInfo[playerid][pPosedovanjeFirme2] == 0) return SCM(playerid,BELA, "{F81414}GRESKA:{FFFFFF} Nemate Biznis!");
			new i = PlayerInfo[playerid][pPosedovanjeFirme2];
			switch(listitem)
			{
				case 0:
				{
				 	if(!IsPlayerInRangeOfPoint(playerid, 15.0, FirmaInfo[i][fUlazX], FirmaInfo[i][fUlazY], FirmaInfo[i][fUlazZ])) return SCM(playerid,BELA,"{F81414}GRESKA:{FFFFFF} Ne ste kaj vasta Firma!");
			 		GivePlayerMoney(playerid,FirmaInfo[i][fCena]/2);
					FirmaInfo[i][fProveraVlasnika] = 0; FirmaInfo[i][fKasa] = 0;
					strmid(FirmaInfo[i][bVlasnik], "Niko", 0, strlen("Niko"), 255); PlayerInfo[playerid][pPosedovanjeFirme2] = 0;
					SacuvajFirme(i); FirmaLP(i); OnPlayerUpdate(playerid);
					format(string,sizeof(string),"{6EF83C}INFO:{FFFFFF}Ja prodadovte Firmata za{FFFFFF}$%d {00C0FF}!",FirmaInfo[i][fCena]);
					SCM(playerid,BELA,string);
				}
				case 1:
				{
        				format(string,sizeof(string),"Kasa: %d ",FirmaInfo[i][fKasa]);
						SCM(playerid,BELA,string);
				}
				case 2:
				{
						SPD(playerid,ZArabotka_FIRMA,DIALOG_STYLE_INPUT, "Podigni Pari", "Vnesite Suma na pari \nkoja sakate da ja podignete od vasata firma", "Podigni", "Izlezi");
		
				}
			}
		}
warn here
Код:
strmid(FirmaInfo[i][bVlasnik], "Niko", 0, strlen("Niko"), 255); PlayerInfo[playerid][pPosedovanjeFirme2] = 0;
(13705) : warning 225: unreachable code
Код:
		if(PlayerInfo[playerid][pFMember] != 255)
		{
		    new family = PlayerInfo[playerid][pFMember];
		    SetPlayerToTeamColor(playerid);
		    SetPlayerInterior(playerid, FamilyInfo[family][FamilyInterior]);
		    SetPlayerPos(playerid, FamilyInfo[family][FamilySpawn][0],FamilyInfo[family][FamilySpawn][1],FamilyInfo[family][FamilySpawn][2]);
		    SetPlayerFacingAngle(playerid, FamilyInfo[family][FamilySpawn][3]);
		    return 1;
		}
		else
		{
			SetPlayerToTeamColor(playerid);
			SetPlayerPos(playerid, 1730.3859,-1912.1241,13.5628); // Spawn kod CIVIL
			SetPlayerInterior(playerid,0);
			PlayerInfo[playerid][pInt] = 0;
			return 0;
		}
	return 1;
}
warn on line
Код:
return 1;
Reply
#4

Try this:
pawn Код:
if(PlayerInfo[playerid][pFMember] != 255)
        {
            new family = PlayerInfo[playerid][pFMember];
            SetPlayerToTeamColor(playerid);
            SetPlayerInterior(playerid, FamilyInfo[family][FamilyInterior]);
            SetPlayerPos(playerid, FamilyInfo[family][FamilySpawn][0],FamilyInfo[family][FamilySpawn][1],FamilyInfo[family][FamilySpawn][2]);
            SetPlayerFacingAngle(playerid, FamilyInfo[family][FamilySpawn][3]);
            return 1;
        }
        else
        {
            SetPlayerToTeamColor(playerid);
            SetPlayerPos(playerid, 1730.3859,-1912.1241,13.5628); // Spawn kod CIVIL
            SetPlayerInterior(playerid,0);
            PlayerInfo[playerid][pInt] = 0;
            return 1;
        }
    return 0;
}
Reply
#5

not fixed.
Reply
#6

pawn Код:
if(PlayerInfo[playerid][pFMember] != 255)
        {
            new family = PlayerInfo[playerid][pFMember];
            SetPlayerToTeamColor(playerid);
            SetPlayerInterior(playerid, FamilyInfo[family][FamilyInterior]);
            SetPlayerPos(playerid, FamilyInfo[family][FamilySpawn][0],FamilyInfo[family][FamilySpawn][1],FamilyInfo[family][FamilySpawn][2]);
            SetPlayerFacingAngle(playerid, FamilyInfo[family][FamilySpawn][3]);
        }
        else
        {
            SetPlayerToTeamColor(playerid);
            SetPlayerPos(playerid, 1730.3859,-1912.1241,13.5628); // Spawn kod CIVIL
            SetPlayerInterior(playerid,0);
            PlayerInfo[playerid][pInt] = 0;
        }
    return 1;
}
pawn Код:
strmid(FirmaInfo[i][bVlasnik], "Niko", 0, strlen("Niko")); PlayerInfo[playerid][pPosedovanjeFirme2] = 0;
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)