y_ini loops a lot of times while loading data - 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 loops a lot of times while loading data (
/showthread.php?tid=577400)
y_ini loops a lot of times while loading data -
Muted - 11.06.2015
Hello, I'm trying to replace my saving/loading system with y_ini. The saving part was pretty easy and works fine, but I am having a problem with loading information from an .ini file. Here's the code:
Код:
INI_ParseFile(File(playerid), "LoadUserData", .bExtra = true, .extra = playerid);
Код:
forward LoadUserData(playerid,name[],value[]);
public LoadUserData(playerid,name[],value[])
{
SendClientMessage(playerid,RED,"TEST");
INI_Int("Xp",playerInfo[playerid][experience]);
INI_Int("Pocket",playerInfo[playerid][pocketmoney]);
INI_Int("Bank",playerInfo[playerid][bankmoney]);
return 1;
}
For some reason LoadUserData gets looped over 20 times, because that's how many "TEST" I get.