Jump to content
  • 0

Eroare Linux


Alexk

Question

Primesc eroarea asta cand folosesc o comanda pe un server de pe linux , dar nu de pe windows 

 

[18:10:22] [debug] Run time error 4: "Array index out of bounds"
[18:10:22] [debug]  Accessing element at negative index -1
[18:10:22] [debug] AMX backtrace:
[18:10:22] [debug] #0 0003c374 in public OnPlayerCommandText (0, 608752) from CarSystem.amx

Comanda care da eroarea :

 

else if(strcmp(x_nr,"panel",true) == 0)
{
   new stringA[250],stringB[250],stringC[250],stringD[250];
new carkey1 = PlayerInfo[playerid][pPcarkey];
new carkey2 = PlayerInfo[playerid][pPcarkey2];
new carkey3 = PlayerInfo[playerid][pPcarkey3];
format(stringA,sizeof(stringB),"{FFAA00}1: {FFFFFF}%s", CarInfo[carkey1][cDescription]),
format(stringB,sizeof(stringB),"{FFAA00}2: {FFFFFF}%s", CarInfo[carkey2][cDescription]),
format(stringC,sizeof(stringB),"{FFAA00}3: {FFFFFF}%s", CarInfo[carkey3][cDescription]),
format(stringD,sizeof(stringD)," %s \n %s \n %s",stringA,stringB,stringC);
ShowPlayerDialog(playerid, DIALOG_CARLIST14, DIALOG_STYLE_LIST, "Cars", stringD, "Exit", "");
}

Comanda merge perfect pe un server de pe windows. Ce as putea face?

Link to comment
Share on other sites

3 answers to this question

Recommended Posts

  • 0

Am refacut comanda uite dar tot nu merge pe windows merge iar pe linux nu merge 

Poftim :

else if(strcmp(x_nr,"panel",true) == 0)
   {
       new stringA[200];
    new carkey1 = PlayerInfo[playerid][pPcarkey];
    new carkey2 = PlayerInfo[playerid][pPcarkey2];
    new carkey3 = PlayerInfo[playerid][pPcarkey3];
    format(stringA,sizeof(stringA),"{FFAA00}1: {FFFFFF}%s\n{FFAA00}2: {FFFFFF}%s\n{FFAA00}3: {FFFFFF}%s ", CarInfo[carkey1][cDescription], CarInfo[carkey2][cDescription], CarInfo[carkey3][cDescription]),
    ShowPlayerDialog(playerid, DIALOG_CARLIST14, DIALOG_STYLE_LIST, "Cars", stringA, "Exit", "");
   }

Link to comment
Share on other sites

  • 0

Ce valoare ia prima data variabila PlayerInfo[ playerid ] [ pPcarkey] ?  Daca e -1 trebuie sa o schimbi pentru ca nu accepta valori negative

 

    __  ____      __           
   /  |/  (_)____/ /____  _____
  / /|_/ / / ___/ __/ _ \/ ___/
 / /  / / (__  ) /_/  __/ /    
/_/  /_/_/____/\__/\___/_/     
SERVICII SCRIPTING DE CALITATE
Pagina     Scripting     pawn
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.