Error mysql
#1

Код:
[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);
		}
Reply
#2

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

So.. what can I do ?
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)