Y_INI issues not saving data on a gamehost.
#1

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

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;
}
Reply
#3

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);
Reply
#4

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

Have you tried using crashdetect?
Reply
#6

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

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


Forum Jump:


Users browsing this thread: 1 Guest(s)