Jump to content

Eroare in consola:


Recommended Posts

dau comanda /v si iau eroarea asta:
[debug]  Accessing element at negative index -400
[debug] AMX backtrace:
[debug] #0 00143eec in ?? (0) from Crown-RPG.amx
[debug] #1 0013deb4 in public cmd_v (0, 195300828) from Crown-RPG.amx
[debug] #2 native CallLocalFunction () from samp-server.exe
[debug] #3 000179e0 in ?? (0, 195300816) from Crown-RPG.amx
[debug] #4 0000622c in public OnPlayerCommandText (0, 195300816) from Crown-RPG.amx

comanda returneaza functia showplayervehicle:

stock ShowPlayerVehicle(playerid) {
    new szTitle[60], szDialog[3000], szDialog2[3000], x = 0;
    if(GetVehicles(playerid) == 0) return SendClientMessage(playerid, COLOR_LGREEN, "Eroare: Nu ai un vehicul personal!");
    
    format(szTitle, sizeof(szTitle), "Your Vehicles {E3DE31}%d/%d", GetVehicles(playerid), GetSlots(playerid));
    strcat(szDialog, "Vehicul\tStatus");
    for(new i = 0; i < 10; i++) {
        if(i < 5) {
            if(i < 3) {
                new car =  PlayerInfo[playerid][pCarKey][i];
                format(szDialog, sizeof szDialog, "%s%s\t%s\n", szDialog, aVehicleNames[CarInfo[car][cModel]-400], CarInfo[car][Spawned] != 0 ? IsVehicleOccupied(CarInfo[car][Spawned]) ? ("{FFFF00}[occupied]") : ("{26B309}[spawned]") : ("{FF0000}[despawned]"));
                strcat(szDialog2, szDialog);
                PlayerInfo[playerid][pCarKey][x] = CarInfo[car][cModel];
                x++;
            }
            else strcat(szDialog2, "{FFD857}<slot liber>\n"), sVehicle[i][playerid] = 0;
        }
        else {
            new car =  PlayerInfo[playerid][pCarKey][i];
            format(szDialog, sizeof szDialog, "%s%s\t%s\n", szDialog, aVehicleNames[CarInfo[car][cModel]-400], CarInfo[car][Spawned] != 0 ? IsVehicleOccupied(CarInfo[car][Spawned]) ? ("{FFFF00}[occupied]") : ("{26B309}[spawned]") : ("{FF0000}[despawned]"));
            strcat(szDialog2, szDialog);
            PlayerInfo[playerid][pCarKey][x] = CarInfo[car][cModel];
            x++;    
        }
    }
    ShowPlayerDialog(playerid, DIALOG_GARAGE, DIALOG_STYLE_TABLIST_HEADERS, szTitle, szDialog, "Ok", "Exit");
    return true;
}

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

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