Re: Writing to file problem (Kernelbase exeption)

2014-06-05 Thread Konrad via Digitalmars-d-learn
Ok, I have rebuilded whole solution in MSVS (I'm using VisualD plugin) and everything started to work with my previously pasted code. @Ali, thank you for advise with concatenation, I haven't thought about that. Also thank you to all of you, guys, all that you wrote was very helpfull. Best

Re: Writing to file problem (Kernelbase exeption)

2014-06-05 Thread Konrad via Digitalmars-d-learn
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++;

Re: Writing to file problem (Kernelbase exeption)

2014-06-05 Thread Konrad via Digitalmars-d-learn
Well, there is a problem with config_file.write(info); but when I'm changing it to write("Data/config.ini", info); (as it states in http://dlang.org/phobos/std_file.html#.write) I'm getting an error of conflict between std.stdio.write and std.file.write. That's why I was using the first line.

Writing to file problem (Kernelbase exeption)

2014-06-05 Thread Konrad via Digitalmars-d-learn
Hi guys! I have problem with writing to a file. My function looks like this: [code] int game_change_config(string _player_spritesheet, string _flame_spritesheet) { string info = _player_spritesheet~"\n"~_flame_spritesheet; auto config_file = File("Data/config.ini"); config_file.write(in