PDA

View Full Version : 1 Warning Help tNx


alishvasis
12/02/2014, 09:23 AM
Hi Why Give Me a Error ? :( Help Me + Rep TnX :Xx

This is Code:

if(Account[playerid][pAdminlevel] == 1)
{
#pragma unused params
for(new car = 1; car <= 268; car++)
{
if(IsVehicleEmpty(car)) SetVehicleToRespawn(car);
}
GetPlayerName(playerid, name, sizeof(name));
format(string, sizeof(string), "[News] {FF0000}loaded allcars By %s .",name);
SendClientMessageToAll(COLOR_PINK, string);
return 1;
}
return 1;
}
stock IsVehicleEmpty(vehicleid)
{
for(new i=0; i<MAX_PLAYERS; i++)
{
if(IsPlayerInVehicle(i, vehicleid)) return 0;
}
return 1;
}
And Give Me This warning:

warning 217: loose indentation


At This Line :

GetPlayerName(playerid, name, sizeof(name));
format(string, sizeof(string), "[News] {FF0000}loaded allcars By %s .",name);
SendClientMessageToAll(COLOR_PINK, string);

MattTucker
12/02/2014, 09:31 AM
if(Account[playerid][pAdminlevel] == 1)
{
new string[128], name[MAX_PLAYER_NAME];
#pragma unused params
for(new car = 1; car <= 268; car++)
{
if(IsVehicleEmpty(car)) SetVehicleToRespawn(car);
}
GetPlayerName(playerid, name, sizeof(name));
format(string, sizeof(string), "[News] {FF0000}loaded allcars By %s .",name);
SendClientMessageToAll(COLOR_PINK, string);
return 1; // I think this one is not needed
}
return 1;
}

If you already have a line having "new string[128], name[MAX_PLAYER_NAME]; " no need to add this line, and I actually assume that warning came out because of your space-ing.

rakshith122
12/02/2014, 09:37 AM
Hi Why Give Me a Error ? :( Help Me + Rep TnX :Xx

If you get the warnings at this line

GetPlayerName(playerid, name, sizeof(name));

Then just delete the " " space before GetPlayerName(playerid,name,sizeof(name));
So, It should be like

GetPlayerName(playerid, name, sizeof(name));

Use this ^


GetPlayerName(playerid, name, sizeof(name));

It should not be like this ^

alishvasis
12/02/2014, 09:54 AM
Then just delete the " " space before GetPlayerName(playerid,name,sizeof(name));
So, It should be like

GetPlayerName(playerid, name, sizeof(name));

Use this ^


GetPlayerName(playerid, name, sizeof(name));

It should not be like this ^

TnX I Reped You LAst Week
I Cant Rep You Again In This Furom :(

rakshith122
12/02/2014, 09:56 AM
HUEHUEHUE, Remember to do it later :P