28.04.2016, 17:39
Haven't written a line of pawn for years (apart from bits of help on here) can't remember how sizeof(array) works on multidimensional arrays/enum, so here's a crap example i hope you can adapt.
EDIT: Removed sizeof for above reasons.
If you get the error printed, then go back to where you call 'DoesOrgExistID' and make sure you dont use an index over 14.
Код:
DoesOrgExistID(orgid) { if(orgid < 15) { new bool: orgExist = false; if(orgid == oInfo[orgid][OID]) { orgExist = true; printf("Org does exist"); } } else printf(<"Error> DoesOrgExistID 'oInfo' out of bounds index is %d but size is 15, orgid); return orgExist; }
If you get the error printed, then go back to where you call 'DoesOrgExistID' and make sure you dont use an index over 14.