pawn-lang / YSI-Includes

Just the YSI include files, none of the extra stuff.
211 stars 107 forks source link

Issue Y_INI and Windows Server #106

Closed ghost closed 8 years ago

ghost commented 8 years ago

Good morning, I meet an issue where when I use Y_INI on Windows SA:MP server (such as local one for testing), all system which use Y_INI for saving INI files are not writing content. The file is created but nothing is saved it. However, when i test it on a linux SA:MP server, no problem appears for saving content. It appears for anything which use Y_INI

Example:

new file[100]; format(file,sizeof(file),"ladmin/config/server_configurations.ini"); new INI:ini = INI_Open(file); INI_WriteInt(ini, "ReadPms", 1); INI_WriteInt(ini, "ReadCmds", 1); INI_WriteInt(ini, "MaxAdminLevel", 5); INI_WriteInt(ini, "AntiSpam", 1); INI_WriteInt(ini, "AntiSwear", 1); INI_WriteInt(ini, "ConnectMessages", 1); INI_WriteInt(ini, "AdminCmdMessages", 1); INI_WriteInt(ini, "MustRegister", 0); INI_Close(ini);

Y-Less commented 8 years ago

You've missed the most important part - the value of file, i.e. the filename.

ghost commented 8 years ago

Oh sorry, I didn't put in the example, but it is in my gamemode: Edited

Y-Less commented 8 years ago

Yes, I thought that was the case. Windows is \, not /.

Southclaws commented 8 years ago

I thought the system-level fopen calls and thus the Pawn runtime was slash-agnostic? Or is it y_ini that enforces \ on windows and / on linux?

ghost commented 8 years ago

Currently, \ provides me : error 027: invalid character constant. However the file is created at the good place while using / with windows

Y-Less commented 8 years ago

You need "\" if you have a string, to stop it acting as the escape character. Southclaw: honestly no idea, but when something doesn't work and something is obviously wrong, that's a good place to start.

Y-Less commented 8 years ago

Does that mean you solved the problem?

SnMaxx commented 7 years ago

Currently, i have this problem. The YSI have any requirement for windows server 2012? use any .dll or something?

Y-Less commented 7 years ago

Nope. It is purely PAWN.