SA-MP Forums Archive
Y_INI issues not saving data on a gamehost. - 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 issues not saving data on a gamehost. (/showthread.php?tid=593306)



Y_INI issues not saving data on a gamehost. - C4SH - 03.11.2015

Hello guys, I've set up a saving system using Y_INI, which i've ran and tested on my local host and it works perfectly, writes data, passwords work ect ect. However, I've just purchased a server from www.vortexservers.com and uploaded all my files, the server works fine, gamemode runs fine, however after registering and logging out, I notice it writes the user file (%s.ini) into a folder named 'Users' in the scriptfiles folder, eg. (C4SH.ini) yet there's no data inside of the file.

Does anyone know or have any suggestions of where this error would be the cause?


Re: Y_INI issues not saving data on a gamehost. - Scottylad - 03.11.2015

Because you need something like this:

Код:
public OnPlayerDisconnect(playerid, reason)
{
    new INI:File = INI_Open(UserPath(playerid)); // - Opens the Userpath and saves it when they disconnect.
    INI_SetTag(File,"Roleplay - User Data"); // - Below, add your own loading things but make it like mine, this is a layout I've made for you.
    INI_WriteInt(File,"Cash",GetPlayerMoney(playerid));
    INI_WriteInt(File,"Admin",PlayerInfo[playerid][pAdmin]);
    INI_Close(File);
}
return 1;
}



Re: Y_INI issues not saving data on a gamehost. - C4SH - 03.11.2015

Look lol. If you read it properly you'll find that it WORKS on my localhost, but not online.

Код:
new INI:File = INI_Open(UserPath(playerid));
    INI_SetTag(File,"data");
    INI_WriteInt(File,"Cash",GetPlayerMoney(playerid));
    INI_WriteInt(File,"Admin",PlayerInfo[playerid][pAdmin]);
    INI_WriteInt(File,"Kills",PlayerInfo[playerid][pKills]);
    INI_WriteInt(File,"Deaths",PlayerInfo[playerid][pDeaths]);
    INI_WriteInt(File,"KillStreak",PlayerInfo[playerid][pKillStreak]);
    INI_WriteInt(File,"Skin",GetPlayerSkin(playerid));
    INI_WriteInt(File,"SkinChanges",PlayerInfo[playerid][pSkinChanges]);
    INI_WriteInt(File,"Sorted",PlayerInfo[playerid][pSorted]);
    INI_Close(File);



Re: Y_INI issues not saving data on a gamehost. - Scottylad - 03.11.2015

MMMmmmm, That is kinda weird, maybe your host does not support it else try making a new account, loading system or file to save the data.


Re: Y_INI issues not saving data on a gamehost. - ThePhenix - 03.11.2015

Have you tried using crashdetect?


Re: Y_INI issues not saving data on a gamehost. - C4SH - 03.11.2015

I've just purchased a whole new game server and uploaded all files onto the server and again, it works perfectly, saves the file to where the script designates and still, the data inside the file is empty.


Re: Y_INI issues not saving data on a gamehost. - Hayden_Almeida - 23.07.2018

Quote:
Originally Posted by C4SH
Посмотреть сообщение
Hello guys, I've set up a saving system using Y_INI, which i've ran and tested on my local host and it works perfectly, writes data, passwords work ect ect. However, I've just purchased a server from www.vortexservers.com and uploaded all my files, the server works fine, gamemode runs fine, however after registering and logging out, I notice it writes the user file (%s.ini) into a folder named 'Users' in the scriptfiles folder, eg. (C4SH.ini) yet there's no data inside of the file.

Does anyone know or have any suggestions of where this error would be the cause?
Same happen to me...