SA-MP Forums Archive
Error mysql - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Server (https://sampforum.blast.hk/forumdisplay.php?fid=6)
+--- Forum: Server Support (https://sampforum.blast.hk/forumdisplay.php?fid=19)
+--- Thread: Error mysql (/showthread.php?tid=595109)



Error mysql - Nin9r - 28.11.2015

Код:
[22:57:44] [debug] Run time error 4: "Array index out of bounds"
[22:57:44] [debug]  Accessing element at index 612 past array upper bound 611
[22:57:44] [debug] AMX backtrace:
[22:57:44] [debug] #0 000cdebc in saveDealer (id=612) at D:\server\gamemodes\vtr.pwn:14157
[22:57:44] [debug] #1 00281914 in public SaveData () at D:\server\gamemodes\vtr.pwn:43328
Код:
stock saveDealer(const id)
{
	Line: 14157: 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;
}
Код:
for(new ff = 0; ff < MAX_DSSLOTS; ff++)
		{
          Line 43328:   saveDealer(ff);
		}



Re: Error mysql - jamesbond007 - 28.11.2015

pretty self explanatory.. did you even read the error? id exceeds the maximum size of one of the arrays


Re: Error mysql - Nin9r - 29.11.2015

So.. what can I do ?