Y_INI Login system problem. - 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 Login system problem. (
/showthread.php?tid=595523)
Solved -
DevHarden - 04.12.2015
Solved
Re: Y_INI Login system problem. -
Denying - 04.12.2015
UserPath could be the problem. Could you show it please?
EDIT: I've never used Y_INI, so I could be wrong. But I'll do my best to help.
Re: Y_INI Login system problem. -
Sellize - 04.12.2015
As Denying said, please show us your userpath function.
Re: Y_INI Login system problem. -
DevHarden - 05.12.2015
PHP код:
stock UserPath(playerid)
{
new string[128],playername[MAX_PLAYER_NAME];
GetPlayerName(playerid,playername,sizeof(playername));
format(string,sizeof(string),PATH,playername);
return string;
}
Sorry for the delay!
Re: Y_INI Login system problem. -
CmZxC - 05.12.2015
Your Userpath is setting all users to be saved as "PATH", playername is ignored.
If your "PATH" ends with a \ then do
PHP код:
format(string,sizeof(string),"%s%s",PATH,playername);
If it does not, do
PHP код:
format(string,sizeof(string),"%s\%s",PATH,playername);
Re: Y_INI Login system problem. -
DevHarden - 05.12.2015
Quote:
Originally Posted by CmZxC
Your Userpath is setting all users to be saved as "PATH", playername is ignored.
If your "PATH" ends with a \ then do
PHP код:
format(string,sizeof(string),"%s%s",PATH,playername);
If it does not, do
PHP код:
format(string,sizeof(string),"%s\%s",PATH,playername);
|
Thank you so much for taking the time to help me out. I'll try that out when I get home. Thanks again!
Re: Y_INI Login system problem. -
DevHarden - 05.12.2015
Quote:
Originally Posted by CmZxC
Your Userpath is setting all users to be saved as "PATH", playername is ignored.
If your "PATH" ends with a \ then do
PHP код:
format(string,sizeof(string),"%s%s",PATH,playername);
If it does not, do
PHP код:
format(string,sizeof(string),"%s\%s",PATH,playername);
|
Hey man, Thanks for taking the time to help. But now all that happens to the player files is they are saved as (%s%s.iniBlackboe) for example I tried both fixes you showed me and both do the same thing. I might add, I don't have trouble with players getting their own save files with their names. They just all inherit the cords and skin as the last person to log off.
Edit:
PHP код:
#define PATH "/Users/%s.ini"
I found out why what you suggested didn't work, Completely forgot to include the define in the main topic.