SA-MP Forums Archive
Loose indention - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: Loose indention (/showthread.php?tid=546178)



Loose indention - zDigol - 13.11.2014

pawn Код:
Reset(playerid);
        printf("[system] NPC %s has connected to the server.", GetName(playerid));
        NPCs++;
        }
*       return 1;
}
Whats wrong? * = error line


Re: Loose indention - Dziugsas - 13.11.2014

Can you show me the full code?Because your text is not indented properly.either indent it right or use #pragma tabsize 0


Re: Loose indention - UltraScripter - 13.11.2014

pawn Код:
Reset(playerid);
    printf("[system] NPC %s has connected to the server.", GetName(playerid));
    NPCs++;
    }
    return 1;
}



Re: Loose indention - UltraScripter - 13.11.2014

no sorry
add:
pawn Код:
#pragma tabsize 0



Re: Loose indention - zDigol - 13.11.2014

Quote:
Originally Posted by UltraScripter
Посмотреть сообщение
pawn Код:
*    Reset(playerid);
    printf("[system] NPC %s has connected to the server.", GetName(playerid));
    NPCs++;
    }
*    return 1;
}
Two indentions


Re: Loose indention - UltraScripter - 13.11.2014

pawn Код:
#pragma tabsize 0



Re: Loose indention - zDigol - 13.11.2014

Already have
pawn Код:
#pragma tabsize 0
but still gives me loose indentions :S


Re: Loose indention - HY - 13.11.2014

Post full code.


Re: Loose indention - UltraScripter - 13.11.2014

give me all code


Re: Loose indention - zDigol - 13.11.2014

pawn Код:
if(!IsPlayerNPC(playerid))
    {
        GeoIP_OnPlayerConnect(playerid);
        new string[128], Name[MAX_PLAYER_NAME];
        GetPlayerName(playerid, Name, sizeof(Name));
        format(string, sizeof(string), "Accounts/%s.ini", Name);

        Reset(playerid);
        SetPlayerColor(playerid, GREY);
        TotalConnections++;
        PlayersOn++;

        if(PlayersOn > MaxVisitors)
        {
            MaxVisitors = PlayersOn;
            UpdateAnalysis();
        }

        // Website textdraw commented out as there's no website specified for the release. Simply uncomment the code which defines the textdraw at the top
        // and remove these 2 comments and uncomment the line below. ...Oh, and the part where the variable 'Textdraw1' is declared.
        //TextDrawShowForPlayer(playerid, Textdraw1);

        if(fexist(string))
        {
            ShowPlayerDialog(playerid, 3894, DIALOG_STYLE_INPUT, "Authentication", "Welcome to Butcherhouse Roleplay\n\nYou have an account, please enter your password to authenticate.", "Login", "Help");
            SendClientMessage(playerid, WHITE, "This name is registered. If you're the account owner, please login with your account credentials to proceed.");
        }
        else
        {
            new playernamesplit[3][MAX_PLAYER_NAME];
            split(Name, playernamesplit, '_');

            if (!strlen(playernamesplit[0]) || !strlen(playernamesplit[1]))
            {
                new NameStr[MAX_PLAYER_NAME];
                format(NameStr, sizeof(NameStr), "NONRPNAME%d", playerid);
                SetPlayerName(playerid, NameStr);

                printf("[system] %s has been forced to the name change menu.", Name);
                //TogglePlayerControllable(playerid, false);
                ShowPlayerDialog(playerid, 594, DIALOG_STYLE_INPUT, "Roleplay Name", "Please select a new, valid roleplaying name.", "Change", "Cancel");
                SendClientMessage(playerid, WHITE, "Your name is not valid, please pick a new one. Refrain from using tags, please and include 1 underscore.");
            }
            else
            {
                ShowPlayerDialog(playerid, 3895, DIALOG_STYLE_INPUT, "Registration", "Please enter your password to register your new account.", "Register", "Cancel");
                SendClientMessage(playerid, WHITE, "This username is not registered. If you register, you'll automatically be logged in!");
            }
        }

        SetPlayerColor(playerid, WHITE);
    }
    else
    {
    Reset(playerid);
    printf("[system] NPC %s has connected to the server.", GetName(playerid));
    NPCs++;
    }
    return 1;
}
Here is the full code.