Re: Writing to file problem (Kernelbase exeption)

2014-06-05 Thread Kagamin via Digitalmars-d-learn
Try to reduce it: remove code from the program piece by piece until you find a fragment, which causes the problem.

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.

Re: Writing to file problem (Kernelbase exeption)

2014-06-05 Thread Stefan Koch via Digitalmars-d-learn
config_file needs to be the string not a struct File .

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 Ali Çehreli via Digitalmars-d-learn
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

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.