SA-MP Forums Archive
Y_INI problem with saving information? - 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: Y_INI problem with saving information? (/showthread.php?tid=485126)



Y_INI problem with saving information? - K9IsGodly - 03.01.2014

I just now got my registration system working, but whenever I make an account, it doesn't save my information. Then, it prints this to the console twice: *** YSI Error: INI_Open could not find or create file /Users/Drake_Dawson.ini

I'm not too good with Y_INI so I really don't know what the problem is, I have all of my defines and includes that I know I need.

Код:
#include <YSI\y_ini>

And then for the registration defines:

#define DIALOG_REGISTER 1
#define DIALOG_LOGIN 2
#define DIALOG_SUCCESS_1 3
#define DIALOG_SUCCESS_2 4
#define PATH "/Users/%s.ini"
I don't really see what the problem is. The code works fine it just won't save any information. How can I make it save the information? I have this all under my defines as well. As I said I'm not too great with Y_INI, but I'm pretty sure it's supposed to write these values into the file.

Код:
enum pInfo
{
    pPass,
    pCash,
    pAdmin,
    pKills,
    pDeaths
}
new PlayerInfo[MAX_PLAYERS][pInfo];

forward LoadUser_data(playerid,name[],value[]);
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]);
    return 1;
}
Any help would be much appreciated!


Re: Y_INI problem with saving information? - Sawalha - 03.01.2014

Show register dialog to see what's the problem