Jump to content

Recommended Posts

Posted

Salut, cum pot sa rezolv erorile astea?

Deci, primadata am facut comanda. A iesit cam asa:

Citat

CMD:gps(playerid, parmas[])
{
    ShowPlayerDialog(playerid, DIALOG_GPS, DIALOG_STYLE_LIST, "Locations of server", "Locatia1\n Locatiea2\n Locatiea3", "Select", "Canecel")
    return 1;
}

Dupa la OnDialogResponse pentru a ne pune un checkpoint:

Citat

    case DIALOG_GPS:
    {
        switch(listitem)
        {
            case 0:
            {
                SetPlayerCheckpoint(playerid, 2141.6711,2358.8105,10.8203)
            }
            case 1:
            {
                SetPlayerCheckpoint(playerid, 2150.1887,2359.1458,10.8203)
            }
            case 2:
            {
                SetPlayerCheckpoint(playerid, 2156.0879,2354.8503,10.8203);
            }
    return 1;

}

Si imi da erorilea astea:

Citat

C:\Users\h\Desktop\un nou inceput\gamemodes\TutorialGM.pwn(325) : error 029: invalid expression, assumed zero
C:\Users\h\Desktop\un nou inceput\gamemodes\TutorialGM.pwn(325) : error 029: invalid expression, assumed zero
C:\Users\h\Desktop\un nou inceput\gamemodes\TutorialGM.pwn(325) : error 029: invalid expression, assumed zero
C:\Users\h\Desktop\un nou inceput\gamemodes\TutorialGM.pwn(325) : fatal error 107: too many error messages on one line

Ce sa fac ?:(

Posted (edited)

la cmd gps ai uitat sa pui punct si virgula la sfarsitul liniei cu dialogul iar ai scris parmas in loc de params

si la dialog_gps la fel nu ai pus ; la final la case 0 si 1 (la setplayercheckpoint..)

Edited by NERS
  • 2 years later...
Posted

CMD:gps(playerid, params[])

{

    ShowPlayerDialog(playerid, DIALOG_GPS, DIALOG_STYLE_LIST, "Locations of server", "Location 1\nLocation 2\nLocation 3", "Select", "Cancel");

    return 1;

}

 

case DIALOG_GPS:

{

    switch (listitem)

    {

        case 0:

        {

            SetPlayerCheckpoint(playerid, 2141.6711, 2358.8105, 10.8203);

            break;

        }

        case 1:

        {

            SetPlayerCheckpoint(playerid, 2150.1887, 2359.1458, 10.8203);

            break;

        }

        case 2:

        {

            SetPlayerCheckpoint(playerid, 2156.0879, 2354.8503, 10.8203);

            break;

        }

    }

    return 1;

}

case DIALOG_GPS:

    {

        switch(listitem)

        {

            case 0:

            {

                SetPlayerCheckpoint(playerid, 2141.6711,2358.8105,10.8203)

            }

            case 1:

            {

                SetPlayerCheckpoint(playerid, 2150.1887,2359.1458,10.8203)

            }

            case 2:

            {

                SetPlayerCheckpoint(playerid, 2156.0879,2354.8503,10.8203);

            }

    return 1;

 

}

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • 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.