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

PHP Code:
.pwn(25047) : warning 219local variable "string" shadows a variable at a preceding level
.pwn(25064) : warning 219local variable "string" shadows a variable at a preceding level
.pwn(25081) : warning 219local variable "string" shadows a variable at a preceding level
.pwn(25098) : warning 219local variable "string" shadows a variable at a preceding level
.pwn(25115) : warning 219local variable "string" shadows a variable at a preceding level
.pwn(25132) : warning 219local variable "string" shadows a variable at a preceding level 
PHP Code:
    if(dialogid == DIALOG_EX 1)
    {
            if(
response)
            {
                if(
listitem == 0)
                {
                    new 
string[MAX_PLAYERS];
                    
//--------------------------------------------------------------
                    
if(Info[playerid][Harvest] == 1) return SendClientMessage(playeridBRIGHT_RED"You have been already started the harvest work.");
                    if(
GetVehicleModel(GetPlayerVehicleID(playerid)) != 532) return SendClientMessage(playeridBRIGHT_RED"You must have enter the combine harvester [532].");
                    
//--------------------------------------------------------------
                    
SetPlayerCheckpoint(playerid, -484.5330, -1480.261213.94577);
                    
format(stringsizeof(string), "You must follow the red markers and you will recieve money.");
                    
SendClientMessage(playeridLIME_GREENstring);
                    
Info[playerid][Harvest] = 1;
                    
//--------------------------------------------------------------
                    
SetVehiclePos(GetPlayerVehicleID(playerid), -485.5200, -1449.115115.7435);
                    
SetVehicleZAngle(GetPlayerVehicleID(playerid), 90);
                    
SetPlayerVirtualWorld(playerid0);
                    
SetPlayerInterior(playerid0);
                }
                if(
listitem == 1)
                {
                    new 
string[MAX_PLAYERS];
                    
//--------------------------------------------------------------
                    
if(Info[playerid][Pizzaboy] == 1) return SendClientMessage(playeridBRIGHT_RED"You have been already started the pizzaboy work.");
                    if(
GetVehicleModel(GetPlayerVehicleID(playerid)) != 448) return SendClientMessage(playeridBRIGHT_RED"You must have enter the pizzaboy bike [448].");
                    
//--------------------------------------------------------------
                    
SetPlayerCheckpoint(playerid1231.7543, -1031.408131.55271);
                    
format(stringsizeof(string), "You must follow the red markers and you will recieve money.");
                    
SendClientMessage(playeridLIME_GREENstring);
                    
Info[playerid][Pizzaboy] = 1;
                    
//--------------------------------------------------------------
                    
SetVehiclePos(GetPlayerVehicleID(playerid), 2090.2952, -1796.763712.9823);
                    
SetVehicleZAngle(GetPlayerVehicleID(playerid), 90);
                    
SetPlayerVirtualWorld(playerid0);
                    
SetPlayerInterior(playerid0);
                }
                if(
listitem == 2)
                {
                    new 
string[MAX_PLAYERS];
                    
//--------------------------------------------------------------
                    
if(Info[playerid][Sweeper] == 1) return SendClientMessage(playeridBRIGHT_RED"You have been already started the sweeper street work.");
                    if(
GetVehicleModel(GetPlayerVehicleID(playerid)) != 574) return SendClientMessage(playeridBRIGHT_RED"You must have enter the sweeper [574].");
                    
//--------------------------------------------------------------
                    
SetPlayerCheckpoint(playerid1152.3113, -1643.763513.50642);
                    
format(stringsizeof(string), "You must follow the red markers and you will recieve money.");
                    
SendClientMessage(playeridLIME_GREENstring);
                    
Info[playerid][Sweeper] = 1;
                    
//--------------------------------------------------------------
                    
SetVehiclePos(GetPlayerVehicleID(playerid), 1192.9980, -1815.328413.3070);
                    
SetVehicleZAngle(GetPlayerVehicleID(playerid), 0);
                    
SetPlayerVirtualWorld(playerid0);
                    
SetPlayerInterior(playerid0);
                }
                if(
listitem == 3)
                {
                    new 
string[MAX_PLAYERS];
                    
//--------------------------------------------------------------
                    
if(Info[playerid][Plumber1] == 1) return SendClientMessage(playeridBRIGHT_RED"You have been already started the plumber work.");
                    if(
GetVehicleModel(GetPlayerVehicleID(playerid)) != 552) return SendClientMessage(playeridBRIGHT_RED"You must have enter the utility van [552].");
                    
//--------------------------------------------------------------
                    
SetPlayerCheckpoint(playerid923.2040, -1138.566023.42733);
                    
format(stringsizeof(string), "You must follow the red markers and you will recieve money.");
                    
SendClientMessage(playeridLIME_GREENstring);
                    
Info[playerid][Plumber1] = 1;
                    
//--------------------------------------------------------------
                    
SetVehiclePos(GetPlayerVehicleID(playerid), 1042.9666, -919.073742.2275);
                    
SetVehicleZAngle(GetPlayerVehicleID(playerid), 0);
                    
SetPlayerVirtualWorld(playerid0);
                    
SetPlayerInterior(playerid0);
                }
                if(
listitem == 4)
                {
                    new 
string[MAX_PLAYERS];
                    
//--------------------------------------------------------------
                    
if(Info[playerid][Trash] == 1) return SendClientMessage(playeridBRIGHT_RED"You have been already started the trash master work.");
                    if(
GetVehicleModel(GetPlayerVehicleID(playerid)) != 408) return SendClientMessage(playeridBRIGHT_RED"You must have enter the trashmaster [408].");
                    
//--------------------------------------------------------------
                    
SetPlayerCheckpoint(playerid1462.9373, -1492.991114.09564);
                    
format(stringsizeof(string), "You must follow the red markers and you will recieve money.");
                    
SendClientMessage(playeridLIME_GREENstring);
                    
Info[playerid][Trash] = 1;
                    
//--------------------------------------------------------------
                    
SetVehiclePos(GetPlayerVehicleID(playerid), 1622.3666, -1813.854714.0602);
                    
SetVehicleZAngle(GetPlayerVehicleID(playerid), 180);
                    
SetPlayerVirtualWorld(playerid0);
                    
SetPlayerInterior(playerid0);
                }
                if(
listitem == 5)
                {
                    new 
string[MAX_PLAYERS];
                    
//--------------------------------------------------------------
                    
if(Info[playerid][Flight] == 1) return SendClientMessage(playeridBRIGHT_RED"You have been already started the flight (pilot) work.");
                    if(
GetVehicleModel(GetPlayerVehicleID(playerid)) != 519) return SendClientMessage(playeridBRIGHT_RED"You must have enter the shamal [519].");
                    
//--------------------------------------------------------------
                    
SetPlayerCheckpoint(playerid1477.50291787.541711.734210);
                    
format(stringsizeof(string), "You must follow the red markers and you will recieve money.");
                    
SendClientMessage(playeridLIME_GREENstring);
                    
Info[playerid][Flight] = 1;
                    
//--------------------------------------------------------------
                    
SetVehiclePos(GetPlayerVehicleID(playerid), 1521.82201175.029511.7344);
                    
SetVehicleZAngle(GetPlayerVehicleID(playerid), 0);
                    
SetPlayerVirtualWorld(playerid0);
                    
SetPlayerInterior(playerid0);
                }
            }
            return 
1;
        } 
Code:
all line :
new string[MAX_PLAYERS];
Reply
#2

If I'm not wrong it's MAX_PLAYER, not MAX_PLAYERS
Reply
#3

Quote:
Originally Posted by SpikeSpigel
View Post
If I'm not wrong it's MAX_PLAYER, not MAX_PLAYERS
wrong :/
Reply
#4

It shows that message when you'r already using a "string", try to rename it to like "string2" for an example and you should be fine!
Reply
#5

  1. Why are you using format if there's nothing to format? What a waste of resources. Just send a client message.
  2. There are places where MAX_PLAYERS is to be used, this is not one of them. The maximum chat output is 144 characters (cells) while MAX_PLAYERS is by default defined as being 1000 cells. Way over the top.
Reply
#6

solved/ thanks guys +1
Dragonic + Vince
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)