Jump to content
  • 0

warning la compilarea GM


laury

Question

salut

am adaugat un fs in gm si imi da 2 warninguri

ma puteti ajuta?

uitati warningurile

gwgf.pwn(9065) : warning 217: loose indentation
gwgf.pwn(9067) : warning 219: local variable "string" shadows a variable at a preceding

si uitati si liniile la care da eroarea

[pawn] if(!strcmp("/moneybag", cmdtext, true))// asta e linia 9065

        {

        new string[150],  money = MoneyBagCash;// asta e linia 9067

        if(!MoneyBagFound) format(string, sizeof(string), "**Un {FF9900}Sac cu bani {FF0000}a fost ascuns in {FFFF66}%s si contine {FF9900}$%d!", MoneyBagLocation,  money);

        if(MoneyBagFound) format(string, sizeof(string), "**Un{FF9900} Sac cu bani {FF0000} nu a fost gasit!");

        return SendClientMessage(playerid, -1, string);

        }

return 0;

}[/pawn]

Link to comment
Share on other sites

5 answers to this question

Recommended Posts

incearca asa

if(!strcmp("/moneybag", cmdtext, true))// asta e linia 9065
{
    new stringz[150],  money = MoneyBagCash;// asta e linia 9067
    if(!MoneyBagFound) format(stringz, sizeof(stringz), "**Un {FF9900}Sac cu bani {FF0000}a fost ascuns in {FFFF66}%s si contine {FF9900}$%d!", MoneyBagLocation,  money);
    if(MoneyBagFound) format(stringz, sizeof(stringz), "**Un{FF9900} Sac cu bani {FF0000} nu a fost gasit!");
    return SendClientMessage(playerid, -1, stringz);
    }
    return 0;
}

9zZndmN.png
Link to comment
Share on other sites

Uite .. Pune asa:

[pawn]if(!strcmp("/moneybag", cmdtext, true))

    {

    new stringz[150],  money = MoneyBagCash;

    if(!MoneyBagFound) format(stringz, sizeof(stringz), "**Un {FF9900}Sac cu bani {FF0000}a fost ascuns in {FFFF66}%s si contine {FF9900}$%d!", MoneyBagLocation,  money);

    if(MoneyBagFound) format(stringz, sizeof(stringz), "**Un{FF9900} Sac cu bani {FF0000} nu a fost gasit!");

    return SendClientMessage(playerid, -1, stringz);

    }

    return 0;

}[/pawn]

[glow=red,2,300]DACA DORITI MAI MULTE INFORMATII VA ROG SA MA CONTACTATI !![/glow]

Link to comment
Share on other sites

loose identitation inseamna ca l-ai aranjat prost fata de restul scripturilor de exemplu[pawn]

public VehicleOccupied(vehicleid)

      {

for(new i=0;i<MAX_PLAYERS;i++)

  {

        if(IsPlayerInVehicle(i,vehicleid)) return 1;

      }

return 0;

}

[/pawn]

DIFERENTA:

[pawn]public VehicleOccupied(vehicleid)

{

        for(new i=0;i<MAX_PLAYERS;i++)

        {

        if(IsPlayerInVehicle(i,vehicleid)) return 1;

}

return 0;

}[/pawn]

35012l1.png.aee1a3398b9bd9f8eec50574d2cd

Link to comment
Share on other sites

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.