debug] Run time error 4: "Array index out of bounds"
#1

Код:
23:03:37] [debug]  Accessing element at negative index -1
[23:03:37] [debug] AMX backtrace:
[23:03:37] [debug] #0 00597570 in ?? (... <1 argument>) at C:\Users\Administrator\Desktop\mode\mode\mode\gamemodes\NGRP.pwn:102998
[23:03:37] [debug] #1 0001402c in public OnPlayerEnterCheckpoint (playerid=13) at C:\Users\Administrator\Desktop\mode\mode\mode\pawno\include\YSI\y_hooks/impl.inc:1146
[23:03:46] [debug] Run time error 4: "Array index out of bounds"
error
Код:
for(new i = 0; i < sizeof(FamilyInfo); i++)
				{
				    if(strcmp(Points[mypoint][Owner], FamilyInfo[i][FamilyName],true) == 0)
					{
						Misc_Save();
						FamilyInfo[i][FamilyBank] = FamilyInfo[i][FamilyBank]+(200);
					}
			 	}
			}
Reply
#2

What line is 102998? The #0 is not very informative.

If it's the line with the strcmp, then mypoint from Points[mypoint][Owner] is -1.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)