1 Warning Help tNx
#1

Hi Why Give Me a Error ? Help Me + Rep TnX :Xx

This is Code:
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:

Code:
warning 217: loose indentation
At This Line :
Code:
 GetPlayerName(playerid, name, sizeof(name));
format(string, sizeof(string), "[News] {FF0000}loaded allcars By %s .",name);
SendClientMessageToAll(COLOR_PINK, string);
Reply
#2

pawn Code:
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.
Reply
#3

Quote:
Originally Posted by alishvasis
View Post
Hi Why Give Me a Error ? Help Me + Rep TnX :Xx

If you get the warnings at this line
Code:
 GetPlayerName(playerid, name, sizeof(name));
Then just delete the " " space before
Code:
 GetPlayerName(playerid,name,sizeof(name));
So, It should be like
pawn Code:
GetPlayerName(playerid, name, sizeof(name));
Use this ^

Code:
 GetPlayerName(playerid, name, sizeof(name));
It should not be like this ^
Reply
#4

Quote:
Originally Posted by rakshith122
View Post
Then just delete the " " space before
Code:
 GetPlayerName(playerid,name,sizeof(name));
So, It should be like
pawn Code:
GetPlayerName(playerid, name, sizeof(name));
Use this ^

Code:
 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
Reply
#5

HUEHUEHUE, Remember to do it later :P
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)