Doesn't load/save user's data
#4

The file's tag has to have the same name as the second part of your loading function's name:
PHP код:
function_THISPARTOFTHEFUNCTIONNAME(playeridname[], value[]) 
The problem with your tag is that it has a space and an apostrophe in it. You can do two things:
  • Rename the function and the tag:
    PHP код:
    INI_SetTag(File"userdata"); 
    PHP код:
    forward loadaccount_userdata(playeridname[], value[]); 
    public 
    loadaccount_userdata(playeridname[], value[]) 
  • Rename the tag and keep the function's name:
    PHP код:
    INI_SetTag(File"user"); 
    PHP код:
    forward loadaccount_user(playeridname[], value[]); 
    public 
    loadaccount_user(playeridname[], value[]) 
From my tutorial:
Quote:
Originally Posted by AndySedeyn
Посмотреть сообщение
FAQ

I am able to log on with any password!
Change:
PHP код:
INI_ParseFile(UserPath(playerid), "LoadPlayerData_%s", .bExtra true, .extra playerid); 
To
PHP код:
INI_ParseFile(UserPath(playerid), "LoadPlayerData_PlayerData", .bExtra true, .extra playerid); 
The data which the placeholder '%s' is replacing, is the name of the file's tag. A huge thanks to Misiur: http://forum.sa-mp.com/showpost.php?...2&postcount=13
EDIT: I just noticed you have a function call to INI_SetTag with the tag 'PlayerData' and one with 'Player's Data'. They should be the same.
Reply


Messages In This Thread
Doesn't load/save user's data - by NealPeteros - 03.11.2016, 16:14
Re: Doesn't load/save user's data - by NealPeteros - 03.11.2016, 16:48
Re: Doesn't load/save user's data - by NealPeteros - 03.11.2016, 17:01
Re: Doesn't load/save user's data - by AndySedeyn - 03.11.2016, 17:52
Re: Doesn't load/save user's data - by NealPeteros - 04.11.2016, 01:25
Re: Doesn't load/save user's data - by AndySedeyn - 04.11.2016, 01:40
Re: Doesn't load/save user's data - by NealPeteros - 04.11.2016, 01:50
Re: Doesn't load/save user's data - by NealPeteros - 04.11.2016, 02:01
Re: Doesn't load/save user's data - by AndySedeyn - 04.11.2016, 02:03
Re: Doesn't load/save user's data - by NealPeteros - 04.11.2016, 02:09

Forum Jump:


Users browsing this thread: 2 Guest(s)