Jump to content
  • 0

SaveData si SaveDealer eroare


SakaLuX

Question

 

[04:23:22] [debug] Run time error 4: "Array index out of bounds"
[04:23:22] [debug]  Accessing element at index 612 past array upper bound 611
[04:23:22] [debug] AMX backtrace:
[04:23:22] [debug] #0 0009beec in saveDealer (id=612) at C:\Users\SakaLuX\Downloads\samp\gamemode.pwn:11258
[04:23:22] [debug] #1 001adbb4 in public SaveData () at C:\Users\SakaLuX\Downloads\samp\gamemode.pwn:31283

Astea sunt erorile pe care le primesc in server_log.cfg. Urmeaza sa va arat si liniile

saveDealer

format(szLargeString, sizeof(szLargeString), "UPDATE dealer SET stock = '%d', Price = '%d', Pprice = '%d', name = '%s' WHERE carID = '%d'", vehSlots[id],vehPrice[id],vehPprice[id],vehName[id],id);

Asta e linia cu probleme iar mai jos in spoiler aveti tot ce va trebuie!

Spoiler

stock saveDealer(const id)
{
    format(szLargeString, sizeof(szLargeString), "UPDATE dealer SET stock = '%d', Price = '%d', Pprice = '%d', name = '%s' WHERE carID = '%d'", vehSlots[id],vehPrice[id],vehPprice[id],vehName[id],id);
    mysql_tquery(handle,szLargeString);
    return 1;
}

SaveData

saveDealer(ff);

Asta e linia cu probleme iar mai jos in spoiler aveti tot ce va trebuie!

Spoiler

public SaveData()
{
        foreach(Player, x)
        {
            savePlayerData(x);
        }
        for(new xh = 0; xh < MAX_HOUSES; xh++)
        {
            saveHouse(xh);
        }
        for(new xf = 0; xf < MAX_GROUPS; xf++)
        {
            saveGroup(xf);
        }
        for(new xc = 0; xc < MAX_CLANS; xc++)
        {
            saveClan(xc);
        }
        for(new xf = 0; xf < MAX_BUSINESSES; xf++)
        {
            saveBusiness(xf);
        }
        for(new xf = 0; xf < MAX_ASSETS; xf++)
        {
            saveAsset(xf);
        }
        for(new ff = 0; ff < 613; ff++)
        {
            saveDealer(ff);
        }
}

Daca va intereseaza si un log de la mysql aveti mai jos

 

Spoiler

[04:07:00] [ERROR] CMySQLResult::GetRowDataByName() - invalid row index ('0')
[04:07:00] [ERROR] CMySQLResult::GetRowDataByName() - invalid row index ('0')
[04:07:05] [ERROR] CMySQLResult::GetRowDataByName() - invalid row index ('0')
[04:07:05] [ERROR] CMySQLResult::GetRowDataByName() - invalid row index ('0')
[04:07:10] [ERROR] CMySQLResult::GetRowDataByName() - invalid row index ('0')
[04:07:10] [ERROR] CMySQLResult::GetRowDataByName() - invalid row index ('0')
[04:09:58] [ERROR] CMySQLQuery::Execute[] - (error #1065) Query was empty
[04:10:41] [ERROR] CMySQLResult::GetRowDataByName() - invalid row index ('0')
[04:10:41] [ERROR] CMySQLResult::GetRowDataByName() - invalid row index ('0')
[04:10:46] [ERROR] CMySQLResult::GetRowDataByName() - invalid row index ('0')
[04:10:46] [ERROR] CMySQLResult::GetRowDataByName() - invalid row index ('0')
[04:10:52] [ERROR] CMySQLResult::GetRowDataByName() - invalid row index ('0')
[04:10:52] [ERROR] CMySQLResult::GetRowDataByName() - invalid row index ('0')

 

Link to comment
Share on other sites

5 answers to this question

Recommended Posts

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.