String won't load
#1

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);
    }
Reply
#2

What saving/loading system are you using? Dini? ******?
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)