13.05.2018, 13:15
Quote:
The callback is called once per value in the script, for you to save the data in global variables and use later. It isn't designed for using the values in the callback itself, since nothing after `INI_Int` will be run.
It was a poor design choice, but it was the choice and now it's done. |
I'm gonna test something out and if it doesn't work I'll edit this comment.
EDIT:
Why is this not loading?
Код:
OnPlayerConnect(playerid) { new PlayerFile[64]; format(PlayerFile, sizeof(PlayerFile), "/Users/%s.ini", GetName(playerid)); if(fexist(PlayerFile)) { INI_ParseFile(PlayerFile, "LoadUser", .bExtra = true, .extra = playerid, .bPassTag = true); //INI_Load(PlayerFile); print("Exists!"); } return 1; } forward LoadUser(playerid, name[], value[]); public LoadUser(playerid, name[], value[]) { INI_Int("Kills", pInfo[playerid][pKills]); INI_Int("Deaths", pInfo[playerid][pDeaths]); INI_Int("Admin", pInfo[playerid][pAdmin]); INI_Int("Vip", pInfo[playerid][pVip]); ... return 0; }