Loading Error
#2

pawn Код:
stock LoadContacts(playerid)
{
    new str[MAX_PLAYER_NAME+20];
    format(str, MAX_PLAYER_NAME+20, "/contacts/%s.ini",GetPlayerNameEx(playerid));
    if(!fexist(str)) fcreate(str);
    new string[256];
    new File:file = fopen(str, io_read);
    if(file)
    {
        new idx = 0;
        while(fread(file, string))
        {
            sscanf(string,"s[MAX_PLAYER_NAME]s[6]", Contacts[playerid][idx], ContactsNum[playerid][idx]);
            idx++;
        }
    }
    fclose(file);
    print("Contacts loaded successfully.");
    return 1;
}
This causes player to get data from the file of another player.
Any help?
Reply


Messages In This Thread
Loading Error - by maramizo - 29.10.2012, 19:59
Re: Loading Error - by maramizo - 29.10.2012, 20:35
Re: Loading Error - by maramizo - 29.10.2012, 21:20
Re: Loading Error - by maramizo - 30.10.2012, 04:36
Re: Loading Error - by maramizo - 30.10.2012, 05:49

Forum Jump:


Users browsing this thread: 1 Guest(s)