SA-MP Forums Archive
String won't load - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: String won't load (/showthread.php?tid=309315)



String won't load - Outcast - 07.01.2012

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);
    }



Re : String won't load - rbcrp - 07.01.2012

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