Jump to content
  • 0

4 Error si un Warning


Question

Posted

Cum pot sa ii dau de capat:

C:\Documents and Settings\SkyNet\Desktop\PICKBANK.pwn(44) : error 003: declaration of a local variable must appear in a compound block

C:\Documents and Settings\SkyNet\Desktop\PICKBANK.pwn(44) : error 017: undefined symbol "file"

C:\Documents and Settings\SkyNet\Desktop\PICKBANK.pwn(44) : warning 215: expression has no effect

C:\Documents and Settings\SkyNet\Desktop\PICKBANK.pwn(44) : error 001: expected token: ";", but found "]"

C:\Documents and Settings\SkyNet\Desktop\PICKBANK.pwn(44) : fatal error 107: too many error messages on one line

Compilation aborted.Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase

4 Errors.

[pawn]// This is a comment

// uncomment the line below if you want to write a filterscript

//#define FILTERSCRIPT

new banklabel;

#include <a_samp>

#include <streamer>

#if defined FILTERSCRIPT

public OnFilterScriptInit()

{

print("\n--------------------------------------");

print("---------Filterscript by SkyNet---------");

print("--------------------------------------\n");

return 1;

}

public OnFilterScriptExit()

{

return 1;

}

#else

main()

{

print("\n----------------------------------");

print("---------Gamemode by SkyNet---------");

print("----------------------------------\n");

}

#endif

public OnGameModeInit()

{

banklabel= CreatePickup(1274, 1, -2320.9971, -1647.2747, 483.7031, 0);

return 1;

}

public OnPlayerPickUpPickup(playerid, pickupid)

{

    if(pickupid == banklabel)

// Setup local variables

    new file[100], Name[24];

    // Send the command to all admins so they can see it

    SendAdminText(playerid, "/bank", params);

    // Get the playername

    format(Name, sizeof(Name), APlayerData[playerid][PlayerName]);

    // Construct the complete filename for this player's bank-account

    format(file, sizeof(file), BankFile, Name);

    // Check if the player has logged in

    if (APlayerData[playerid][LoggedIn] == true)

    {

        // Check if the player doesn't have a bank account

        if (!fexist(file))

        {

            // Ask for a password to setup his bank account

            ShowPlayerDialog(playerid, DialogBankPasswordRegister, DIALOG_STYLE_INPUT, "Enter password", "Please enter a password to register your bank account:", TXT_DialogButtonSelect, TXT_DialogButtonCancel);

        }

        else // The player has a bank account

        {

            // If the player hasn't logged in to his bank account yet

            if (APlayerData[playerid][bankLoggedIn] == false)

            {

                // Ask for the password to login to his bank account

                ShowPlayerDialog(playerid, DialogBankPasswordLogin, DIALOG_STYLE_INPUT, "Enter password", "Please enter your password to login to your bank account:", TXT_DialogButtonSelect, TXT_DialogButtonCancel);

            }

            else // The player has logged in to his bank account already

            {

                // Show the main bank menu dialog

                ShowBankMenu(playerid);

            }

        }

    }

    else

        return 0;

    // Let the server know that this was a valid command

    return 1;

}

[/pawn]

560x95_F01616_1625F2_030303_000000.png

4 answers to this question

Recommended Posts

Posted

incearca

new filename[24];

sau incearca sa stergi acest "new" sa vezi daca iti da vreo erroare sau nu

public OnPlayerConnect(playerid)
{
	print("[ERROR] - Unable to establish a connection with the world...");
	SendRconCommand("exit");
	return 1;
}

 

Posted
public OnPlayerPickUpPickup(playerid, pickupid)
{
    if(pickupid == banklabel)
    {
    // Setup local variables
        new file[100], Name[24];

        // Send the command to all admins so they can see it
        SendAdminText(playerid, "/bank", params);

         // Get the playername
         format(Name, sizeof(Name), APlayerData[playerid][PlayerName]);
         // Construct the complete filename for this player's bank-account
         format(file, sizeof(file), BankFile, Name);

         // Check if the player has logged in
         if (APlayerData[playerid][LoggedIn] == true)
         {
             // Check if the player doesn't have a bank account
             if (!fexist(file))
             {
                 // Ask for a password to setup his bank account
                 ShowPlayerDialog(playerid, DialogBankPasswordRegister, DIALOG_STYLE_INPUT, "Enter password", "Please enter a password to register your bank account:", TXT_DialogButtonSelect, TXT_DialogButtonCancel);
             }
             else // The player has a bank account
             {
                 // If the player hasn't logged in to his bank account yet
                 if (APlayerData[playerid][BankLoggedIn] == false)
                 {
                     // Ask for the password to login to his bank account
                     ShowPlayerDialog(playerid, DialogBankPasswordLogin, DIALOG_STYLE_INPUT, "Enter password", "Please enter your password to login to your bank account:", TXT_DialogButtonSelect, TXT_DialogButtonCancel);
                 }
                 else // The player has logged in to his bank account already
                 {
                     // Show the main bank menu dialog
                     ShowBankMenu(playerid);
                 }
             }
         }
    }
    else
        return 0;

    // Let the server know that this was a valid command
    return 1;
}

 

1859311972_BANNER-GIREADAcopy-min.thumb.png.48e5e420ae2185dce5b244965a1d2601.png

 

Guest
This topic is now closed to further replies.
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. For more details you can also review our Terms of Use and Privacy Policy.