SA-MP Forums Archive
[Help]Problem With YINI - 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: [Help]Problem With YINI (/showthread.php?tid=540716)



[Help]Problem With YINI - Mamal75 - 06.10.2014

Hello EveryOne...
I Have A GameMode That Using YINI To Save Player & House & Server Data !
My Problem:

When I Run The Server EveryThing Is Ok And Work good.
But after some hours when a player join the server YINI Can't Create Or Open the player file !
and print: *** YSI Error: INI_Open could not find or create file \Users\XXX.ini

everything is ok but some hours after run server this problem and error will appear !
some times if i don't restart server, server closed itself (maybe crash!)
i'm confused...
please help me...



Re: [Help]Problem With YINI - Eth - 06.10.2014

show me the onplayerconnect pls


Re: [Help]Problem With YINI - Mamal75 - 06.10.2014

pawn Code:
public OnPlayerConnect(playerid)
{
if(fexist(UserPath(playerid)))
{
   INI_ParseFile(UserPath(playerid), "LoadUser_%s", .bExtra = true, .extra = playerid);
   ShowPlayerDialog(playerid, DIALOG_LOGIN, DIALOG_STYLE_PASSWORD,"{C2FF33}Login To Server","{FF6633}Enter Your Password To login","Login","Exit");
}
else
{
 SendClientMessage(playerid,~0,"{FFCC00}[SERVER]: {FF3232}Register An Account!");
 ShowPlayerDialog(playerid, DIALOG_REGISTER, DIALOG_STYLE_PASSWORD,"{339933}Registration","{C2FF33}Enter A Password Below to register","Register","Cancel");
}
if(fexist(PHousePath(playerid)))
{
  INI_ParseFile(PHousePath(playerid), "LoadPHouse_%s", .bExtra = true, .extra = playerid);
}

//>After load user data and user house data i reset the variables and check if player banned kick him/her |

  return 1;
}
Eth i sent full OnPlayerConnect in pm...check it !


Re: [Help]Problem With YINI - Eth - 06.10.2014

do you have userpath?
I mean have you defined its stock?
if so show it to me


Re: [Help]Problem With YINI - Mamal75 - 06.10.2014

Yes i use Path

pawn Code:
#define PATH "\\Users\\%s.ini"
stock UserPath(playerid)
{
    new string[128],playername[MAX_PLAYER_NAME];
    GetPlayerName(playerid,playername,sizeof(playername));
    format(string,sizeof(string),PATH,playername);
    return string;
}
i'm confused because when i run the server its ok and work...but after some hours......


Re: [Help]Problem With YINI - Eth - 06.10.2014

try to replace
pawn Code:
#define PATH "\\Users\\%s.ini"
to
pawn Code:
#define PATH "\Users\%s.ini"



Re: [Help]Problem With YINI - Mamal75 - 06.10.2014

Path location is right because if i use "\" instead of "\\" i will get compiler error:

invalid character constant

when i start server its work !!!!
but after some hours i get this errors and..


Re: [Help]Problem With YINI - Eth - 06.10.2014

change
pawn Code:
#define PATH "\\Users\\%s.ini"
to
pawn Code:
#define PATH "/Users/%s.ini"



Re: [Help]Problem With YINI - Mamal75 - 07.10.2014

other ideas ?


Re: [Help]Problem With YINI - Mamal75 - 07.10.2014

Plaese someone help me about this problem…
My server is down because of this problem
Its emergency
Help please