18.05.2020, 14:57
is this correct?
Code:
LoadThePay() { new sz_FacPayStr[128], File: i_FileHandle, arrayIndex; #define PAY_FILE "factionpay.cfg" if(!fexist(PAY_FILE)) return 1; // Why create a file when you're trying to load? i_FileHandle = fopen(PAY_FILE, io_read); while (arrayIndex < sizeof(FactionPay)) { fread(i_FileHandle, sz_FacPayStr); sscanf(sz_FacPayStr, "p<|>iiiiiii", FactionPay[arrayIndex][0], FactionPay[arrayIndex][1], FactionPay[arrayIndex][2], FactionPay[arrayIndex][3], FactionPay[arrayIndex][4], FactionPay[arrayIndex][5], FactionPay[arrayIndex][6]); arrayIndex++; } return fclose(i_FileHandle); }