Jump to content

Recommended Posts

Posted (edited)

C:\G\Samp\ultimul dat afara sintetick\samp03\gamemodes\gamemode.pwn(14256) : warning 219: local variable "string" shadows a variable at a preceding level
C:\GI\Samp\ultimul dat afara sintetick\samp03\gamemodes\gamemode.pwn(20609) : warning 213: tag mismatch
C:\G\Samp\ultimul dat afara sintetick\samp03\gamemodes\gamemode.pwn(20609) : warning 213: tag mismatch
C:\G\Samp\ultimul dat afara sintetick\samp03\gamemodes\gamemode.pwn(20609) : warning 213: tag mismatch
C:\G\Samp\ultimul dat afara sintetick\samp03\gamemodes\gamemode.pwn(63045) : warning 203: symbol is never used: "Insta"
C:\G\Samp\ultimul dat afara sintetick\samp03\gamemodes\gamemode.pwn(63045) : warning 203: symbol is never used: "instac"
Pawn compiler 3.2.3664              Copyright (c) 1997-2006, ITB CompuPhase


6 Warnings.

 

Linia (14256)   new string[128];

Quote

else if(CP[playerid] == 100000) {
        if(forkcrates[playerid] == 0) return SCM(playerid, -1, "Nu ai destule cutii!");
        if(forkliftstarted[playerid] == 0) return SendClientMessage(playerid, COLOR_YELLOW, "{FFFF00}Nu ai o cursa inceputa pentru a o putea termina!");
        forkliftstarted[playerid] = 0;
        DisablePlayerCheckpoint(playerid);
        PlayerInfo[playerid][pForkliftRem] -= forkcrates[playerid];
        PlayerInfo[playerid][pForkliftTimes] += forkcrates[playerid];
        new money = PlayerInfo[playerid][pForkliftSkill] * forkcrates[playerid] * 1000 + random(10000) + 10000;
        new string[128];
        format(string, sizeof(string), "Ai terminat munca! Ai primit $%s!", FormatNumber(money));
        SCM(playerid, COLOR_GREEN, string);
        GivePlayerCash(playerid, money);
        Update(playerid, pCashx);
        DestroyVehicle(forkliftcar[playerid]);
        DestroyPlayerObject(playerid, cutie[playerid]);
        forkliftcar[playerid] = 0;
        forkcrates[playerid] = 0;
        PlayerInfo[playerid][pForkliftRem] -= 1;
        PlayerInfo[playerid][pForkliftTimes] += 1;
        Update(playerid, pForkliftTimesx);
        if(PlayerInfo[playerid][pForkliftSkill] <= 5)

Linia ( (20609)GetPlayerPos(playerid, X, Y, Z);

Quote

}
CMD:createjob(playerid, params[])
{
    if(PlayerInfo[playerid][pAdmin] < 7) return 1;
    new name[30], minlevel, legal, string [ 128 ];
    if(sscanf(params, "s[30]ii", name, minlevel, legal)) return SendClientMessage(playerid, -1, "Syntax: /createjob <name> <min level> <legal>  0 = illegal | 1 = legal");
    if(legal < 0 || legal > 1) return SendClientMessage(playerid, -1, "Min. 0 max. 1 ( 0 = illegal | 1 = legal )");
    if(minlevel < 1 || minlevel > 5) return SendClientMessage(playerid, -1, "Min. level 1 | max level 5.");
    if(strlen(name) < 3 || strlen(name) > 29) return SendClientMessage(playerid, -1, "The job name must between into 3 and 29 characters!");
    new X, Y, Z;
    GetPlayerPos(playerid, X, Y, Z);
    SendClientMessage(playerid, -1, "[DEBUG] Job created!");
    new query [ 158 ];
    mysql_format(SQL, query, 158, "INSERT INTO `job` (Name, NeedLevel, Legal, PosX, PosY, PosZ) VALUES ('%s', '%d', '%d', '%f', '%f', '%f')", name, minlevel, legal, X, Y, Z);
    mysql_query(SQL, query);
    format(string, 128, "{FFFFFF}ID: {C00A13}Processing after server restart\n{FFFFFF}Job: {C00A13}%s\n{FFFFFF}Use {C00A13}/getjob {FFFFFF}to get job.", name);
    Create3DTextLabel(string, 0xFFFFFFFF,X, Y, Z,20.0, 0, 1);
    AddStaticPickup(1239, 23, X, Y, Z);
    return true;
}

Linia (63045) este  finalul Gamemodului ultima linie

Edited by Pitbul97
Posted
Citat

Linia (14256)   new string[128];

Inseamna ca ai un alt new string la un nivel mai sus, adica in exteriorul else if-ului else if(CP[playerid] == 100000). Solutie denumeste altfel acest new string la care e warning

Citat

Linia ( (20609)GetPlayerPos(playerid, X, Y, Z);

X Y si Z trebuie sa fie float adica

new Float:X, Float:Y, Float:Z;

Pentru ca functia respectiva asteapta float nu integer ca si parametru

Citat

warning 203: symbol is never used: "Insta"

warning 203: symbol is never used: "instac"

Asta inseamna ca cele doua simboluri cum le numeste compilatorul nu sunt folosite. Adica undeva in scriptul tau posibil exista aceste doua variabile globale new insta si new instac sauuuu cele doua sunt de fapt functi si nu sunt folosite nicaieri in cod

  • Thanks 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.