11.10.2011, 09:37
Код:
public LoadFamilies() { new arrCoords[38][64]; new strFromFile2[512]; new File: file = fopen("families.cfg", io_read); if(file) { new idx; while (idx < sizeof(FamilyInfo)) { fread(file, strFromFile2); split(strFromFile2, arrCoords, '|'); FamilyInfo[idx][FamilyTaken] = strvalEx(arrCoords[0]); strmid(FamilyInfo[idx][FamilyName], arrCoords[1], 0, strlen(arrCoords[1]), 255); strmid(FamilyInfo[idx][FamilyMOTD], arrCoords[2], 0, strlen(arrCoords[2]), 255); strmid(FamilyInfo[idx][FamilyLeader], arrCoords[3], 0, strlen(arrCoords[3]), 255); FamilyInfo[idx][FamilyBank] = strvalEx(arrCoords[4]); FamilyInfo[idx][FamilyCash] = strvalEx(arrCoords[5]); FamilyInfo[idx][FamilySafe] = strvalEx(arrCoords[6]); FamilyInfo[idx][FamilySafePos][0] = floatstr(arrCoords[7]); FamilyInfo[idx][FamilySafePos][1] = floatstr(arrCoords[8]); FamilyInfo[idx][FamilySafePos][2] = floatstr(arrCoords[9]); FamilyInfo[idx][FamilyPot] = strvalEx(arrCoords[10]); FamilyInfo[idx][FamilyCrack] = strvalEx(arrCoords[11]); FamilyInfo[idx][FamilyMats] = strvalEx(arrCoords[12]); strmid(FamilyRank[idx][0], arrCoords[13], 0, strlen(arrCoords[13]), 255); strmid(FamilyRank[idx][1], arrCoords[14], 0, strlen(arrCoords[14]), 255); strmid(FamilyRank[idx][2], arrCoords[15], 0, strlen(arrCoords[15]), 255); strmid(FamilyRank[idx][3], arrCoords[16], 0, strlen(arrCoords[16]), 255); strmid(FamilyRank[idx][4], arrCoords[17], 0, strlen(arrCoords[17]), 255); strmid(FamilyRank[idx][5], arrCoords[18], 0, strlen(arrCoords[18]), 255); FamilyInfo[idx][FamilyMembers] = strvalEx(arrCoords[19]); FamilyInfo[idx][FamilySkins] = strvalEx(arrCoords[20]); FamilyInfo[idx][FamilySkin1] = strvalEx(arrCoords[21]); FamilyInfo[idx][FamilySkin2] = strvalEx(arrCoords[22]); FamilyInfo[idx][FamilySkin3] = strvalEx(arrCoords[23]); FamilyInfo[idx][FamilySkin4] = strvalEx(arrCoords[24]); FamilyInfo[idx][FamilySkin5] = strvalEx(arrCoords[25]); FamilyInfo[idx][FamilySkin6] = strvalEx(arrCoords[26]); FamilyInfo[idx][FamilySkin7] = strvalEx(arrCoords[27]); FamilyInfo[idx][FamilySkin8] = strvalEx(arrCoords[28]); FamilyInfo[idx][FStrikes] = strvalEx(arrCoords[29]); FamilyInfo[idx][Colt45] = strvalEx(arrCoords[30]); FamilyInfo[idx][Shotgun] = strvalEx(arrCoords[31]); FamilyInfo[idx][MP5] = strvalEx(arrCoords[32]); FamilyInfo[idx][AK47] = strvalEx(arrCoords[33]); FamilyInfo[idx][M4] = strvalEx(arrCoords[34]); FamilyInfo[idx][SPAS12] = strvalEx(arrCoords[35]); FamilyInfo[idx][Rifle] = strvalEx(arrCoords[36]); FamilyInfo[idx][Sniper] = strvalEx(arrCoords[37]); FamilyInfo[idx][FamilyCocaine] = strvalEx(arrCoords[38]); idx++; } fclose(file); } return 1; }
Line 16944
Код:
FamilyInfo[idx][FamilyCocaine] = strvalEx(arrCoords[38]);
Код:
C:\Users\Bart\Downloads\LS-RPG\SARP R112\gamemodes\sarp.pwn(16944) : error 032: array index out of bounds (variable "arrCoords") Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase 1 Error.