minipopov 16 Posted December 15, 2017 Hey, What i want: I want to generate some file from arma to create hpp file from an editor dialog. I have already test make_file.dll from KillzoneKid but it's doing bullshit when you try to write something inside hpp (it's works with txt) and i can't see the source... so i want to do mine. What i do:I create 2 projects on visual, one for test script on console windows and one for arma, you could check both of them on git : https://github.com/minipopov/make_file. I think that 2 scripts are equal.. and when you execute LearnString, it's write the file outputFromWindowsExec.hpp. End of line '\n' works well, but not in arma. So i try to use endl in sqf => end of line is taken into account but it skip a line between my 2 lines. One solution that i find: my string like this Quote private _string = "ligne1 ligne2"; "make_file" callExtension ("file.hpp|"+_string); With this one, it s work. Question: Just why the fuck \n or \r\n didn't work? What should i do to do this? Obviously, i'm new at C/C++ script... Share this post Link to post Share on other sites
Dedmen 2588 Posted December 15, 2017 \n doesn't magically turn into a newline. If you write "\n" in Arma you'll get a string that contains a backslash and a lowercase n. Is that what is confusing you? Your post is very confusing and badly written. Share this post Link to post Share on other sites
minipopov 16 Posted December 15, 2017 I test with endl (https://community.bistudio.com/wiki/endl) too and it skip line. It does something like that Quote ligne1 ligne2 I wan't Quote ligne1 ligne2 What should i do? Sorry for my shit post.. i don't really know how to explain it Share this post Link to post Share on other sites
Dedmen 2588 Posted December 15, 2017 Can you show the actual code you are using. endl doesn't skip a line. You are doing something wrong in your code. But you don't show anything so there is no way I can know what you do wrong. Share this post Link to post Share on other sites
minipopov 16 Posted December 16, 2017 Hummm.. that s weird. This is my initPlayerLocal.sqf Quote private _string = "ligne1" + endl + "ligne2"; "make_file" callExtension ("file.hpp|"+_string); I always check file.hpp into sublime and it's look like this: http://prntscr.com/ho4f7b We could see that there is 3 lines When i'm openning the same file into block note: http://prntscr.com/ho4gkm We could see that there is 2 lines LearnString.cpp is same function but give me that: http://prntscr.com/ho4hqc Now with this initPlayerLocal.sqf Quote private _string = "ligne1 ligne2"; "make_file" callExtension ("file.hpp|"+_string); I get the good file.hpp http://prntscr.com/ho4ika Do you have any idea? (i didn't change anything in dll) Share this post Link to post Share on other sites