On 06/05/2014 01:39 PM, Konrad wrote:> Right now I have:
>
> import file = std.file;
> import std.stdio;
>
> int game_change_config(string _player_spritesheet, string
> _flame_spritesheet) {
> string info = _player_spritesheet~"\n"~_flame_spritesheet;
> char[] info_table;
> for(int i = 0; i < info.length; i++) {
> info_table.length++;
> info_table[info_table.length - 1] = info[i];
That is not necessary, a simple concatenation would be the equivalent:
info_table ~= info[i]; // instead of the previous two lines
> }
> file.write("Data/config.ini", info_table);
Random guess: Try with full path and see whether that helps. How about
file access rights? Can you write to that file by other means?
Ali