[Help]Problem With YINI
#1

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...
Reply
#2

show me the onplayerconnect pls
Reply
#3

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 !
Reply
#4

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

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......
Reply
#6

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

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..
Reply
#8

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

other ideas ?
Reply
#10

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


Forum Jump:


Users browsing this thread: 1 Guest(s)