14.09.2013, 21:55
This is my code, I get this error on every public line
How can I fix it?
Код:
C:\Users\Namn\Desktop\Server\gamemodes\larp.pwn(90176) : warning 219: local variable "hitid" shadows a variable at a preceding level C:\Users\Namn\Desktop\Server\gamemodes\larp.pwn(90187) : warning 219: local variable "hitid" shadows a variable at a preceding level C:\Users\Namn\Desktop\Server\gamemodes\larp.pwn(90198) : warning 219: local variable "hitid" shadows a variable at a preceding level C:\Users\Namn\Desktop\Server\gamemodes\larp.pwn(90222) : warning 219: local variable "hitid" shadows a variable at a preceding level C:\Users\Namn\Desktop\Server\gamemodes\larp.pwn(90252) : warning 219: local variable "hitid" shadows a variable at a preceding level C:\Users\Namn\Desktop\Server\gamemodes\larp.pwn(90282) : warning 219: local variable "hitid" shadows a variable at a preceding level Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase 6 Warnings.
pawn Код:
forward SearchCallHome(playerid,hitid);
public SearchCallHome(playerid,hitid) //Here
{
new string[128];
new name[24];
GetPlayerName(hitid, name, sizeof(name));
format(string, sizeof(string),"I need information about %s's House. Contact me when you find it.", name);
ProxDetector(20.0, playerid, string, COLOR_PINK,COLOR_PINK,COLOR_PINK,COLOR_PINK,COLOR_PINK);
return 1;
}
forward SearchCallVehicle(playerid,hitid);
public SearchCallVehicle(playerid,hitid)//Here
{
new string[128];
new name[24];
GetPlayerName(hitid, name, sizeof(name));
format(string, sizeof(string),"I need information about %s's Vehicle. Contact me when you find it.", name);
ProxDetector(20.0, playerid, string, COLOR_PINK,COLOR_PINK,COLOR_PINK,COLOR_PINK,COLOR_PINK);
return 1;
}
forward SearchHome(playerid,hitid);
public SearchHome(playerid,hitid)//Here
{
new string[128];
new name[24];
if(PlayerInfo[hitid][pPhousekey] != 9999)
{
GetPlayerName(hitid, name, sizeof(name));
DisablePlayerCheckpoint(playerid);
gPlayerCheckpointStatus[playerid] = CHECKPOINT_NONE;
SetPlayerCheckpoint(playerid,HouseInfo[PlayerInfo[hitid][pPhousekey]][hEntrancex], HouseInfo[PlayerInfo[hitid][pPhousekey]][hEntrancey], HouseInfo[PlayerInfo[hitid][pPhousekey]][hEntrancez], 4.0);
format(string, sizeof(string),"Informer: I located %s house GPS cordinates are in your phone, Follow them!", name);
SendClientMessage(playerid, COLOR_YELLOW, string);
gPlayerCheckpointStatus[playerid] = CHECKPOINT_HOME;
}
else
{
GetPlayerName(hitid, name, sizeof(name));
format(string, sizeof(string),"Informer: I've looked everywhere and I can't find any house that belongs to %s.",name);
SendClientMessage(playerid, COLOR_YELLOW, string);
}
return 1;
}
forward SearchVehicle(playerid,hitid);
public SearchVehicle(playerid,hitid)//Here
{
new string[128];
new name[24];
if(PlayerInfo[hitid][pPcarkey] != 9999)
{
new carid = PlayerInfo[hitid][pPcarkey];
new Float:X, Float:Y, Float:Z;
new zone[MAX_ZONE_NAME];
GetVehicle2DZone(carid, zone, MAX_ZONE_NAME);
GetVehiclePos(carid, X,Y,Z);
GetPlayerName(hitid, name, sizeof(name));
DisablePlayerCheckpoint(playerid);
gPlayerCheckpointStatus[playerid] = CHECKPOINT_NONE;
SetPlayerCheckpoint(playerid, X,Y,Z, 5.0);
format(string, sizeof(string),"Informer: I located %s vehicle at %s GPS cordinates is in your phone, Follow them!",name,zone);
SendClientMessage(playerid, COLOR_YELLOW, string);
SendClientMessage(playerid, COLOR_GREY,"((/removecp when you find it))");
return 1;
}
else
{
GetPlayerName(hitid, name, sizeof(name));
format(string, sizeof(string),"Player doesn't have a vehicle in that slot",name);
SendClientMessage(playerid, COLOR_YELLOW, string);
}
return 1;
}
forward SearchVehicle2(playerid,hitid);
public SearchVehicle2(playerid,hitid)//Here
{
new string[128];
new name[24];
if(PlayerInfo[hitid][pPcarkey2] != 9999)
{
new carid = PlayerInfo[hitid][pPcarkey2];
new Float:X, Float:Y, Float:Z;
new zone[MAX_ZONE_NAME];
GetVehicle2DZone(carid, zone, MAX_ZONE_NAME);
GetVehiclePos(carid, X,Y,Z);
GetPlayerName(hitid, name, sizeof(name));
DisablePlayerCheckpoint(playerid);
gPlayerCheckpointStatus[playerid] = CHECKPOINT_NONE;
SetPlayerCheckpoint(playerid, X,Y,Z, 5.0);
format(string, sizeof(string),"Informer: I located %s vehicle at %s GPS cordinates is in your phone, Follow them!",name,zone);
SendClientMessage(playerid, COLOR_YELLOW, string);
SendClientMessage(playerid, COLOR_GREY,"((/removecp when you find it))");
return 1;
}
else
{
GetPlayerName(hitid, name, sizeof(name));
format(string, sizeof(string),"Player doesn't have a vehicle in that slot",name);
SendClientMessage(playerid, COLOR_YELLOW, string);
}
return 1;
}
forward SearchVehicle3(playerid,hitid);
public SearchVehicle3(playerid,hitid)//Here
{
new string[128];
new name[24];
if(PlayerInfo[hitid][pPcarkey3] != 9999)
{
new carid = PlayerInfo[hitid][pPcarkey3];
new Float:X, Float:Y, Float:Z;
new zone[MAX_ZONE_NAME];
GetVehicle2DZone(carid, zone, MAX_ZONE_NAME);
GetVehiclePos(carid, X,Y,Z);
GetPlayerName(hitid, name, sizeof(name));
DisablePlayerCheckpoint(playerid);
gPlayerCheckpointStatus[playerid] = CHECKPOINT_NONE;
SetPlayerCheckpoint(playerid, X,Y,Z, 5.0);
format(string, sizeof(string),"Informer: I located %s vehicle at %s GPS cordinates is in your phone, Follow them!",name,zone);
SendClientMessage(playerid, COLOR_YELLOW, string);
SendClientMessage(playerid, COLOR_GREY,"((/removecp when you find it))");
return 1;
}
else
{
GetPlayerName(hitid, name, sizeof(name));
format(string, sizeof(string),"Player doesn't have a vehicle in that slot",name);
SendClientMessage(playerid, COLOR_YELLOW, string);
}
return 1;
}