Load strings with file.inc or yini from file.
#9

I dont to complicate like this, I want to know how to make using PlayerInfo for that my strings, if anyone know any solution,idea please reply.

Now I'm on this:

I have created:
PHP код:
public LoadUser_data(playerid,name[],value[])
{
    
INI_Int("Password",PlayerInfo[playerid][pPass]);
    
INI_Int("Cash",PlayerInfo[playerid][pCash]);
    
INI_Int("Admin",PlayerInfo[playerid][pAdmin]);
    
INI_Int("Kills",PlayerInfo[playerid][pKills]);
    
INI_Int("Deaths",PlayerInfo[playerid][pDeaths]);
    
INI_Int("1.PAR",PlayerInfo[playerid][pPar1]);
    return 
1;

but dont know how to save from this
PHP код:
new string[256];
                    new 
File:pos=fopen("Parovi.txt"io_readwrite);
                    while(
fread(posstring))
                    {
                    
format(stringsizeof(string), "%s TIP:1\n"string);
                    
PlayerInfo[playerid][pPar1] = string);
                    
/*new File:ftw=fopen(UserPath(playerid), io_append);
                    fwrite(ftw, "TIKET:\n");
                    fwrite(ftw, string);
                    fclose(ftw);
                    fclose(pos);*/
                    
new INI:File INI_Open(UserPath(playerid));
                    
INI_WriteInt(File,"1.PAR",PlayerInfo[playerid][pPar1]);
                    
INI_Close(File); 
it says array must be indexed on line PlayerInfo[playerid][pPar1] = string);
how to save that string in that pPar1
Reply


Messages In This Thread

Forum Jump:


Users browsing this thread: 1 Guest(s)