[HELP]Some Errors And Warnings!!
#1

-DELETE-
Reply
#2

God damnit, whenever you post errors you have to post the code too. I hate it when little cluckers do this
Reply
#3

I Posted Code Dude :P In Pastebin
Reply
#4

Omg Damnit Big Cluckers As Not Read Posts -.-
Reply
#5

Look at the end, you have an else statement and too many closed braces.
Reply
#6

Quote:
Originally Posted by Dwane
Посмотреть сообщение
Look at the end, you have an else statement and too many closed braces.
Only Get Errors x)
Help Me Please..
Reply
#7

Код:
 SendClientMessage(playerid, COLOR_RED, "You Entered Incorrect Password, You Have Been Kicked");
 Kick(playerid);
Код:
                       SetSpawnInfo(playerid, 0, 0, -379.09, -1445.18, 25.72, 180.0, 0, 0, 0, 0, 0, 0 );
                       SpawnPlayer(playerid);
                       SetPlayerColor(playerid, COLOR_ORANGE);
These 2 should remove your loose identitation!
Reply
#8

pawn Код:
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
    if(dialogid == Dialog_Register) // The Dialog_Register Dialog
    {
        if(!response) return Kick(playerid); // If Player Pressed "Quit" Kick Player
        if(response) // If Player Pressed "Register"
        {
            if(!strlen(inputtext)) // If Player Not Enter A Password
            {
                ShowPlayerDialog(playerid, Dialog_Register, DIALOG_STYLE_PASSWORD, "Register", "Welcome To Trucking\nEnter A Good Secure Password To Register", "Register", "Quit"); // Register Dialog
                return 1;
            }
            // If Player Entered A Password
            new hashpass[129]; // Wil Hash The Players Password
            WP_Hash(hashpass,sizeof(hashpass),inputtext); // Let Whirlpool Hash The Players Password
            new INI:file = INI_Open(Path(playerid)); // Wil Make A Config File To The Account
            INI_SetTag(file,"Player Data"); // Wil Save The Player Data
            INI_WriteString(file,"Password",hashpass); // Wil Save The Hashed Password
            INI_WriteInt(file,"Admin Level",0); // Wil Save The Admin Level
            INI_WriteInt(file,"Money",0); // Wil Save The Money
            INI_WriteInt(file,"Scores",0); // Wil Save The Score
            INI_WriteInt(file,"Kills",0); // Wil Save The Kills
            INI_WriteInt(file,"Deaths",0); // Wil Save The Deaths
            INI_Close(file); // Data Saved And Close File
            SendClientMessage(playerid,-1,"You Have Been Registred Successfully!"); // Message To Player Successfully Registred
            return 1;
        }
    }
    if(dialogid == Dialog_Login) // Login Dialog
    {
        if(!response) return Kick(playerid); // When Player Press "Quit" Kick Player
        if(response) // When Player Press "Register"
        {
            new hashpass[129]; // Wil Hash Players Password
            WP_Hash(hashpass,sizeof(hashpass),inputtext); // Hash The Password The Player Inputed
            if(!strcmp(hashpass,pInfo[playerid][Pass])) // Check If Player Enter Correct Password
            { // If Player Enter Right Password
                INI_ParseFile(Path(playerid),"loadaccount_%s",.bExtra = true, .extra = playerid); // Loads Account To The Player
                SetPlayerScore(playerid,pInfo[playerid][Scores]); // Set They Saved Score In Config
                GivePlayerMoney(playerid,pInfo[playerid][Money]); // Set The Cash Saved In Config
                SendClientMessage(playerid,-1,"Welcome back! You have successfully logged in"); // Tell Him He Logged In
                return 1;
            }
            else // If Player Enter Incorrect Password
            {
                SendClientMessage(playerid, COLOR_RED, "You Entered Incorrect Password, You Have Been Kicked");
                Kick(playerid);
                return 1;
            }
        }
    }
    if(dialogid == DIALOG_CLASS)// Our dialog!
    {
        if( response )
        {
            switch(listitem)// Checking which listitem was selected
            {
                case 0: // Class Trucker
                {
                    SetSpawnInfo(playerid, 0, 0, -379.09, -1445.18, 25.72, 180.0, 0, 0, 0, 0, 0, 0 );
                    SpawnPlayer(playerid);
                    SetPlayerColor(playerid, COLOR_ORANGE);
                    return 1;
                }
                case 1: // Class Bus Driver
                {
                    SetSpawnInfo(playerid, 0, 0, -379.09, -1445.18, 25.72, 180.0, 0, 0, 0, 0, 0, 0 );
                    SpawnPlayer(playerid);
                    SetPlayerColor(playerid, COLOR_RED);
                    return 1;
                }
                case 2: // Class Farmer
                {
                    SetSpawnInfo(playerid, 0, 0, -379.09, -1445.18, 25.72, 180.0, 0, 0, 0, 0, 0, 0 );
                    SpawnPlayer(playerid);
                    SetPlayerColor(playerid, COLOR_RED);
                    return 1;
                }
                case 3: // Class Train Driver
                {
                    SetSpawnInfo(playerid, 0, 0, -379.09, -1445.18, 25.72, 180.0, 0, 0, 0, 0, 0, 0 );
                    SpawnPlayer(playerid);
                    SetPlayerColor(playerid, COLOR_RED);
                    return 1;
                }
                case 4: // Class Garbage Man
                {
                    SetSpawnInfo(playerid, 0, 0, -379.09, -1445.18, 25.72, 180.0, 0, 0, 0, 0, 0, 0 );
                    SpawnPlayer(playerid);
                    SetPlayerColor(playerid, COLOR_RED);
                    return 1;
                }
            }
        }
        else return Kick(playerid); // Kick Player If He Press Kick
    }
    return 1; // Return 1; if it's gamemode, otherwise return 0;
}
Reply
#9

Thanks
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)