Loose indentation
#1

I have:

pawn Код:
public OnPlayerConnect(playerid)
{
        new file[100],Name[MAX_PLAYER_NAME],Ip[16];
        GetPlayerName(playerid,Name,sizeof(Name));
        GetPlayerIp(playerid,Ip,sizeof(Ip));
        format(file,sizeof(file),PlayerFile,Name);
        strcat(PlayerInfo[playerid][pName],                 dini_Get(file,"Name"));
        strcat(PlayerInfo[playerid][pIP],                   dini_Get(file,"Ip"));
        PlayerInfo[playerid][pRegistered]                   = dini_Int(file,"Registered");
        PlayerInfo[playerid][pPassword]                     = dini_Int(file,"Password");
        PlayerInfo[playerid][pJailed]                       = dini_Int(file,"Jailed");
        PlayerInfo[playerid][pJailTime]                     = dini_Int(file,"JailTime");
        PlayerInfo[playerid][pJailed]                       = dini_Int(file, "Cash");
        PlayerInfo[playerid][pAdmin]                        = dini_Int(file, "Admin");
        PlayerInfo[playerid][pCash]                         = dini_Int(file, "Cash");
        PlayerInfo[playerid][pRegistered]                   = dini_Int(file, "Registered");
        PlayerInfo[playerid][pLogged]                       = 0;

    if(!dini_Exists(file))
    {
        ClearChatbox(playerid,10);
        SendClientMessage(playerid, COLOR_WHITE, "Your username is not recognized on this server. Please");
        SendClientMessage(playerid, COLOR_WHITE, "/register <Password> to continue to get your account registered.");
    }
    else
    {
        ClearChatbox(playerid,10);
        SendClientMessage(playerid, COLOR_WHITE, "Your username is recognized on this server. Please");
        SendClientMessage(playerid, COLOR_WHITE, "/login <Password> to continue to get your account logged in.");
        return 1;
    }
    return 1;
}
and I get this when I compile:


Quote:

C:\Users\dell\Desktop\Urban FreeRoam\filterscripts\AccountSystem.pwn(124) : warning 217: loose indentation
Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase


1 Warning.

Reply
#2

pawn Код:
#pragma tabsize 0
On top of your script
Reply
#3

pawn Код:
new file[100],Name[MAX_PLAYER_NAME],Ip[16];
        GetPlayerName(playerid,Name,sizeof(Name));
        GetPlayerIp(playerid,Ip,sizeof(Ip));
        format(file,sizeof(file),PlayerFile,Name);
        strcat(PlayerInfo[playerid][pName],                 dini_Get(file,"Name"));
        strcat(PlayerInfo[playerid][pIP],                   dini_Get(file,"Ip"));
        PlayerInfo[playerid][pRegistered]                   = dini_Int(file,"Registered");
        PlayerInfo[playerid][pPassword]                     = dini_Int(file,"Password");
        PlayerInfo[playerid][pJailed]                       = dini_Int(file,"Jailed");
        PlayerInfo[playerid][pJailTime]                     = dini_Int(file,"JailTime");
        PlayerInfo[playerid][pJailed]                       = dini_Int(file, "Cash");
        PlayerInfo[playerid][pAdmin]                        = dini_Int(file, "Admin");
        PlayerInfo[playerid][pCash]                         = dini_Int(file, "Cash");
        PlayerInfo[playerid][pRegistered]                   = dini_Int(file, "Registered");
        PlayerInfo[playerid][pLogged]                       = 0;
From the pawn code it shows you have one to many indentions. Delete one. Indention means tab spaces.
Reply
#4

Quote:
Originally Posted by Garc1a
Посмотреть сообщение
I have:

pawn Код:
public OnPlayerConnect(playerid)
{
        new file[100],Name[MAX_PLAYER_NAME],Ip[16];
        GetPlayerName(playerid,Name,sizeof(Name));
        GetPlayerIp(playerid,Ip,sizeof(Ip));
        format(file,sizeof(file),PlayerFile,Name);
        strcat(PlayerInfo[playerid][pName],                 dini_Get(file,"Name"));
        strcat(PlayerInfo[playerid][pIP],                   dini_Get(file,"Ip"));
        PlayerInfo[playerid][pRegistered]                   = dini_Int(file,"Registered");
        PlayerInfo[playerid][pPassword]                     = dini_Int(file,"Password");
        PlayerInfo[playerid][pJailed]                       = dini_Int(file,"Jailed");
        PlayerInfo[playerid][pJailTime]                     = dini_Int(file,"JailTime");
        PlayerInfo[playerid][pJailed]                       = dini_Int(file, "Cash");
        PlayerInfo[playerid][pAdmin]                        = dini_Int(file, "Admin");
        PlayerInfo[playerid][pCash]                         = dini_Int(file, "Cash");
        PlayerInfo[playerid][pRegistered]                   = dini_Int(file, "Registered");
        PlayerInfo[playerid][pLogged]                       = 0;

    if(!dini_Exists(file))
    {
        ClearChatbox(playerid,10);
        SendClientMessage(playerid, COLOR_WHITE, "Your username is not recognized on this server. Please");
        SendClientMessage(playerid, COLOR_WHITE, "/register <Password> to continue to get your account registered.");
    }
    else
    {
        ClearChatbox(playerid,10);
        SendClientMessage(playerid, COLOR_WHITE, "Your username is recognized on this server. Please");
        SendClientMessage(playerid, COLOR_WHITE, "/login <Password> to continue to get your account logged in.");
        return 1;
    }
    return 1;
}
and I get this when I compile:
You have an >>Tab<< too much ....you should arrange your code a little bit.
Or you can do this:
pawn Код:
#pragma tabsize 0 //at the top of your script
Reply
#5

Quote:
Originally Posted by Alex_Valde
Посмотреть сообщение
You have an >>Tab<< too much ....you should arrange your code a little bit.
Or you can do this:
pawn Код:
#pragma tabsize 0 //at the top of your script
I already said that
Reply
#6

Quote:
Originally Posted by admantis
Посмотреть сообщение
I already said that
Sorry, I was too late
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)