Index returning crazy high value
#1

So I have a problem, I is returning as 2515036 for some reason.




Код:
	for(new i=0;i<10;i++) 
	{
			format(query, sizeof(query), "%s, `factionWeapon%d` = '%d', `factionAmmo%d` = '%d'", query, i, FactionData[factionid][factionWeapons][i], i, FactionData[factionid][factionAmmo][i]);
	}
Код:
[debug] Run time error 4: "Array index out of bounds"
[debug]  Accessing element at index 2515036 past array upper bound 10
[debug] AMX backtrace:
[debug] #0 0005af34 in Faction_Save (factionid=0) at lsr.pwn:4913
[debug] #1 00058f8c in public cmd_savefaction (playerid=0, params[]=@003009bc "") at lsr.pwn:4777
[debug] #2 native CallLocalFunction () from samp-server.exe
[debug] #3 00000854 in public OnPlayerCommandText (playerid=0, cmdtext[]=@00300988 "/savefaction") at C:\Program Files (x86)\PAWN Compiler\include\zcmd.inc:104
Reply


Messages In This Thread
Index returning crazy high value - by Alex_T - 26.12.2015, 21:43
Re: Index returning crazy high value - by prineside - 26.12.2015, 21:59
Re: Index returning crazy high value - by Alex_T - 26.12.2015, 22:10
Re: Index returning crazy high value - by prineside - 26.12.2015, 22:16
Re: Index returning crazy high value - by Alex_T - 26.12.2015, 22:18
Re: Index returning crazy high value - by Alex_T - 27.12.2015, 00:49
Re: Index returning crazy high value - by SickAttack - 27.12.2015, 02:02
Re: Index returning crazy high value - by Mauzen - 27.12.2015, 02:18
Re: Index returning crazy high value - by Alex_T - 27.12.2015, 03:03
Re: Index returning crazy high value - by Alex_T - 27.12.2015, 04:58

Forum Jump:


Users browsing this thread: 1 Guest(s)