07.01.2012, 06:14
Well, whenever I log in and I type a command /note view, none of the notes are loaded and it says I don't have any notes on me. It is working if I add a note in-game, but when I log in they're not loaded from the user file.
pawn Код:
format(usfile2, sizeof(usfile2), "AccountsUpdate/%s.ini", pName[playerid]);
new File:UserFile2 = fopen(usfile, io_read); // Open the file
if(UserFile2){
while (fread(UserFile2, Data, sizeof(Data)))
{ // LOAD FROM NEW USERFILES FOR UPDATES
key = ini_GetKey(Data);
if(strcmp(key ,"Note1" ,true ) == 0) { val = ini_GetValue(Data); format(pInfo[playerid][pNote1], 100, "%s", strval(val));}
if(strcmp(key ,"Note2" ,true ) == 0) { val = ini_GetValue(Data); format(pInfo[playerid][pNote2], 100, "%s", strval(val));}
if(strcmp(key ,"Note3" ,true ) == 0) { val = ini_GetValue(Data); format(pInfo[playerid][pNote3], 100, "%s", strval(val));}
if(strcmp(key ,"Note4" ,true ) == 0) { val = ini_GetValue(Data); format(pInfo[playerid][pNote4], 100, "%s", strval(val));}
if(strcmp(key ,"Note5" ,true ) == 0) { val = ini_GetValue(Data); format(pInfo[playerid][pNote5], 100, "%s", strval(val));}
}
fclose(UserFile2);
}