Okay, first let me explain why I'm doing this.
I was two months trying to fix the error that happens with my MySQL, I did not find a solution, then i had to made a way to store data in INI files.
It works as: inside a folder in scriptfiles, the files are stored, in ascending numerical order.
Each file for example contains the player's name and his score, So if I want to get certain data from a certain thing, I just perform a Loop through all files, and I use strcmp to check if the file is or is not from the player.
This would be useful, you could create a system to save vehicles only using .INI, it would include the vehicles of players that are Off too, because the files are numbered, not with the name of each player.
So that's it, the code where the problem is:
PHP Code:
stock UserPath(playerid)
{
new fmt[50];
new pName[50];
new FileID;
for(new i = 0; i < 500; i ++)
{
format(fmt,sizeof(fmt),PATH, i);
INI_Load(fmt);
INI_String("Nome", pName, 50);
if(!strcmp(PlayerName(playerid), pName))
{
FileID = i;
break;
}
}
return FileID;
}
I know this may sound ridiculous, but it is a solution to my problem with MySQL, if anyone can help, I would really appreciate it.