[Ajuda] Warning's -
noobre - 11.03.2011
tenho estes warnings, que nao consigo tirar.
pawn Код:
C:\Users\Pedro Nobre\Desktop\crp\gamemodes\crp.pwn(4231) : warning 219: local variable "x_info" shadows a variable at a preceding level
C:\Users\Pedro Nobre\Desktop\crp\gamemodes\crp.pwn(4231) : warning 203: symbol is never used: "x_info"
linha:
Re: [Ajuda] Warning's -
DartakousLien - 11.03.2011
tenta assim...
o 24 й o total de caracteres, agora depende de como usa, e quantos caracteres sao...
Re: [Ajuda] Warning's -
noobre - 11.03.2011
deu certo, tenho outro aqui:
pawn Код:
PlayerLocalMessage(playerid,15.0,"%s (ID:%d) Teve um erro e caiu do servidor.", GetPlayerNameEx(playerid), playerid);
erro:
pawn Код:
C:\Users\Pedro Nobre\Desktop\WFT-RP!\gamemodes\WFV-RP.pwn(5847) : warning 202: number of arguments does not match definition
C:\Users\Pedro Nobre\Desktop\WFT-RP!\gamemodes\WFV-RP.pwn(5847) : warning 202: number of arguments does not match definition
Re: [Ajuda] Warning's -
leandro123456 - 11.03.2011
vai ter que posta o codigo da funзгo PlayerLocalMessage
Re: [Ajuda] Warning's -
noobre - 11.03.2011
pawn Код:
public PlayerLocalMessage(playerid,Float:radius,message[])
{
new string[128];
format(string, sizeof(string), "(LOCAL) %s %s", GetPlayerNameEx(playerid), message);
ProxDetector(20.0, playerid, string, COLOR_LOCALMSG,COLOR_LOCALMSG,COLOR_LOCALMSG,COLOR_LOCALMSG,COLOR_LOCALMSG);
PlayerLocalLog(string);
return 1;
}
Re: [Ajuda] Warning's -
leandro123456 - 11.03.2011
pawn Код:
new str[70];
format(str,sizeof(str),"%s (ID:%d) Teve um erro e caiu do servidor.", GetPlayerNameEx(playerid),playerid);
PlayerLocalMessage(playerid,15.0,str);
desse modo e melhor, nгo tem format embutido nessa funзгo
Re: [Ajuda] Warning's -
Ricop522 - 11.03.2011
pawn Код:
public PlayerLocalMessage(playerid,Float:radius,message[])
{
new string[128];
format(string, sizeof(string), "(LOCAL) %s %s", GetPlayerNameEx(playerid), message);
ProxDetector(radius, playerid, string, COLOR_LOCALMSG,COLOR_LOCALMSG,COLOR_LOCALMSG,COLOR_LOCALMSG,COLOR_LOCALMSG);
PlayerLocalLog(string);
return 1;
}
Re: [Ajuda] Warning's -
noobre - 11.03.2011
mas meto isso no public PlayerLocalMessage ?
Re: [Ajuda] Warning's -
DartakousLien - 11.03.2011
subestitui isto
pawn Код:
PlayerLocalMessage(playerid,15.0,"%s (ID:%d) Teve um erro e caiu do servidor.", GetPlayerNameEx(playerid), playerid);
por isto
pawn Код:
new str[70];
format(str,sizeof(str),"%s (ID:%d) Teve um erro e caiu do servidor.", GetPlayerNameEx(playerid),playerid);
PlayerLocalMessage(playerid,15.0,str);
Re: [Ajuda] Warning's -
noobre - 11.03.2011
Cуdigo:
pawn Код:
public LoadDynamicCars()
{
new arrCoords[21][64];
new strFromFile2[256];
new File: file = fopen("WFVRP_Scriptfiles/Cars/carspawns.cfg", io_read);
if (file)
{
new idx;
while (idx < sizeof(DynamicCars))
{
fread(file, strFromFile2);
split(strFromFile2, arrCoords, '|');
DynamicCars[idx][CarModel] = strval(arrCoords[0]);
DynamicCars[idx][CarX] = floatstr(arrCoords[1]);
DynamicCars[idx][CarY] = floatstr(arrCoords[2]);
DynamicCars[idx][CarZ] = floatstr(arrCoords[3]);
DynamicCars[idx][CarAngle] = floatstr(arrCoords[4]);
DynamicCars[idx][CarColor1] = strval(arrCoords[5]);
DynamicCars[idx][CarColor2] = strval(arrCoords[6]);
DynamicCars[idx][FactionCar] = strval(arrCoords[7]);
DynamicCars[idx][CarType] = strval(arrCoords[8]);
DynamicCars[idx][buy] = strval(arrCoords[9]);
DynamicCars[idx][comprado] = strval(arrCoords[10]);
DynamicCars[idx][valor] = strval(arrCoords[11]);
DynamicCars[idx][drogascarro] = strval(arrCoords[12]);
DynamicCars[idx][matscarro] = strval(arrCoords[13]);
DynamicCars[idx][arma1] = strval(arrCoords[14]);
DynamicCars[idx][ammo1] = strval(arrCoords[15]);
DynamicCars[idx][arma2] = strval(arrCoords[16]);
DynamicCars[idx][ammo2] = strval(arrCoords[17]);
DynamicCars[idx][arma3] = strval(arrCoords[18]);
DynamicCars[idx][ammo3] = strval(arrCoords[19]);
DynamicCars[idx][avariado] = strval(arrCoords[20]);
new vehicleid = CreateVehicle(DynamicCars[idx][CarModel],DynamicCars[idx][CarX],DynamicCars[idx][CarY],DynamicCars[idx][CarZ],DynamicCars[idx][CarAngle],DynamicCars[idx][CarColor1],DynamicCars[idx][CarColor2], -1,DynamicCars[idx][buy],DynamicCars[idx][comprado],DynamicCars[idx][valor],DynamicCars[idx][drogascarro],DynamicCars[idx][matscarro],DynamicCars[idx][arma1],DynamicCars[idx][ammo1],DynamicCars[idx][arma2],DynamicCars[idx][ammo2],DynamicCars[idx][arma3],DynamicCars[idx][ammo3]);
if(DynamicCars[idx][FactionCar] != 255)
{
SetVehicleNumberPlate(vehicleid, DynamicFactions[DynamicCars[idx][FactionCar]][fName]);
SetVehicleToRespawn(vehicleid);
}
idx++;
}
fclose(file);
}
return 1;
}
warning nesta linha:
pawn Код:
new vehicleid = CreateVehicle(DynamicCars[idx][CarModel],DynamicCars[idx][CarX],DynamicCars[idx][CarY],DynamicCars[idx][CarZ],DynamicCars[idx][CarAngle],DynamicCars[idx][CarColor1],DynamicCars[idx][CarColor2], -1,DynamicCars[idx][buy],DynamicCars[idx][comprado],DynamicCars[idx][valor],DynamicCars[idx][drogascarro],DynamicCars[idx][matscarro],DynamicCars[idx][arma1],DynamicCars[idx][ammo1],DynamicCars[idx][arma2],DynamicCars[idx][ammo2],DynamicCars[idx][arma3],DynamicCars[idx][ammo3]);