Problem with YSI\y_ini
#1

So today I switched from using Dini to y_ini and my code just doesn't work for some weird reason.

I read lots of posts about y_ini and they all say that this should be working:

Код:
OnPlayerConnect(playerid)
{
	if(fexist(filename)) //I formatted the filename to be exactly my name(for testing purposes).
	{
	        print("Exists.");
		INI_ParseFile(filename, "LoadUser",.bExtra = true,.extra = playerid,.bPassTag = true);
	}
        return 1;
}

new score;
forward LoadUser(playerid, name[], value[]);
public LoadUser(playerid, name[], value[])
{
	print("Yep");
	INI_Int("score", score);
	SetPlayerScore(playerid, score);
	return 1;
}
Both "Exists." and "Yep" get printed but my score doesn't get set to 10 (that's what the ini file contains).

Can anyone help me?
Thanks in advanced

Btw this is just a test script.
Reply


Messages In This Thread
Problem with YSI\y_ini - by andrejc999 - 12.05.2018, 18:21
Re: Problem with YSI\y_ini - by David (Sabljak) - 12.05.2018, 20:30
Re: Problem with YSI\y_ini - by andrejc999 - 12.05.2018, 20:41
Re: Problem with YSI\y_ini - by David (Sabljak) - 13.05.2018, 09:04
Re: Problem with YSI\y_ini - by andrejc999 - 13.05.2018, 13:15
Re: Problem with YSI\y_ini - by andrejc999 - 13.05.2018, 15:34

Forum Jump:


Users browsing this thread: 2 Guest(s)