Jump to content
  • 0

Erori in consola la debug.


Punct.

Question

Nick: Punct.

Problema: Erori in consola la debug

Erori / warnings:

[13:33:55] [debug] Run time error 4: "Array index out of bounds"
[13:33:55] [debug]  Accessing element at index 19 past array upper bound 18
[13:33:55] [debug] AMX backtrace:
[13:33:55] [debug] #0 0009c460 in public SetPlayerToTeamColor (playerid=0) at C:\~Jocuri~\Trucking samp\gamemodes\v3.4.pwn:9909
[13:33:55] [debug] #1 0009ae60 in public SetPlayerSpawn (playerid=0) at C:\~Jocuri~\Trucking samp\gamemodes\v3.4.pwn:9830
[13:33:55] [debug] #2 00077ca8 in public OnAccountLoad (playerid=0) at C:\~Jocuri~\Trucking samp\gamemodes\v3.4.pwn:6331
[13:33:56] [debug] Run time error 4: "Array index out of bounds"
[13:33:56] [debug]  Accessing element at index 19 past array upper bound 18
[13:33:56] [debug] AMX backtrace:
[13:33:56] [debug] #0 0009c460 in public SetPlayerToTeamColor (playerid=0) at C:\~Jocuri~\Trucking samp\gamemodes\v3.4.pwn:9909
[13:33:56] [debug] #1 00091c3c in public OnPlayerSpawn (playerid=0) at C:\~Jocuri~\Trucking samp\gamemodes\v3.4.pwn:9010

Lini/script:

[pawn]

public SetPlayerToTeamColor(playerid)

{

if(IsPlayerConnected(playerid))

{

    for(new idx=1; idx<=sizeof(TeritoriuInfo); idx++)

{

if(TeritoriuInfo[idx][tOwned] == 4) // Linie 9909

{

  GangZoneShowForPlayer(playerid, turf[idx], 0x258127BD);

}

else if(TeritoriuInfo[idx][tOwned] == 5)

{

    GangZoneShowForPlayer(playerid, turf[idx], 0x9B5137BD);

}

else if(TeritoriuInfo[idx][tOwned] == 6)

{

    GangZoneShowForPlayer(playerid, turf[idx], 0xD084D7BD);

}

else if(TeritoriuInfo[idx][tOwned] == 7)

{

    GangZoneShowForPlayer(playerid, turf[idx], 0x009F98BD);

}

}

}

}

public SetPlayerSpawn(playerid)

{

if(IsPlayerConnected(playerid))

{

if (PlayerInfo[playerid][pFactiune] == 4 || PlayerInfo[playerid][pLider] == 4) // Spawn Familia Mararu

{

    SetPlayerToTeamColor(playerid);

    SetPlayerInterior(playerid, 0); // Linie 9830

    SetPlayerVirtualWorld(playerid, 0);

    SetPlayerPos(playerid, -68.87, 1222.73, 22.44);

    return 1;

}

}

return 1;

}

public OnAccountLoad(playerid)

{

new rows, fields;

    cache_get_data(rows, fields, mysql);

    if(rows != 0) //if there is row

    {

        CancelSelectTextDraw(playerid);

for(new t=0; t<sizeof(Login); t++)

{

    PlayerTextDrawHide(playerid, Login[t][playerid]);

}

for(new l=0; l<99; l++)

SCM(playerid, c_alb, " ");

PlayerInfo[playerid][pLevel] = cache_get_row_int(0, 4);

    PlayerInfo[playerid][pCash] = cache_get_row_int(0, 5);

    PlayerInfo[playerid][pAdmin] = cache_get_row_int(0, 6);

    PlayerInfo[playerid][pKills] = cache_get_row_int(0, 7);

    PlayerInfo[playerid][pDeaths] = cache_get_row_int(0, 8);

    PlayerInfo[playerid][pHouseKey] = cache_get_row_int(0, 9);

    PlayerInfo[playerid][pSpawn] = cache_get_row_int(0, 10);

    PlayerInfo[playerid][pTutorial] = cache_get_row_int(0, 11);

    PlayerInfo[playerid][pSkin] = cache_get_row_int(0, 12);

    PlayerInfo[playerid][pJob] = cache_get_row_int(0, 13);

    PlayerInfo[playerid][pCurse] = cache_get_row_int(0, 14);

    PlayerInfo[playerid][pFactiune] = cache_get_row_int(0, 15);

PlayerInfo[playerid][pRank] = cache_get_row_int(0, 16);

PlayerInfo[playerid][pLider] = cache_get_row_int(0, 17);

PlayerInfo[playerid][pCar] = cache_get_row_int(0, 18);

PlayerInfo[playerid][pBank]    = cache_get_row_int(0, 19);

PlayerInfo[playerid][pJail]    = cache_get_row_int(0, 20);

PlayerInfo[playerid][pJailTime] = cache_get_row_int(0, 21);

PlayerInfo[playerid][pWanted]  = cache_get_row_int(0, 22);

PlayerInfo[playerid][pWantedLevel]  =      cache_get_row_int(0, 23);

PlayerInfo[playerid][pRespect]      =      cache_get_row_int(0, 24);

//...

for(new t; t != sizeof(Logo); ++t) // Linie 6331

{

TextDrawShowForPlayer(playerid, Logo[t]);

}

return 1;

}

[/pawn]

Ai incercat sa rezolvi singur ?: Da... ma chinui de ceva timp sa le rezolv, dar nu reusesc. Nu stiu daca din vina acestor erori, dar mtextdraw-urile nu apar si la unele comenzi imi da Unknown command.

Edit: Am rezolv o problema.. dar mai le mai am pe cele de mai sus...

Nu mai deschideti in pu*a mea servere de SA:MP !

Jucati-va pe cele care sunt !   Sunt suficiente !

Reguli de bun simt:

1. Nu faceti reclama unde nu trebuie !

2. Nu injurati ca la usa cortului !

3. Daca esti analfabeti, taci din gura !

4. Nu abuza de 'scuze', 'din greseala' !

 

My work ::: http://pastebin.com/VRNRcaAs

Link to comment
Share on other sites

1 answer to this question

Recommended Posts

[glow=purple,2,300][move] REZOLVAT! [/move][/glow]

Nu mai deschideti in pu*a mea servere de SA:MP !

Jucati-va pe cele care sunt !   Sunt suficiente !

Reguli de bun simt:

1. Nu faceti reclama unde nu trebuie !

2. Nu injurati ca la usa cortului !

3. Daca esti analfabeti, taci din gura !

4. Nu abuza de 'scuze', 'din greseala' !

 

My work ::: http://pastebin.com/VRNRcaAs

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.