In my continuing saga of reading a files' contents into a zorro script, I have come across a problem. To recreate this you need to: A: open notepad and type a few lines pressing return at the end of each line and then save the file in zorro's history folder. Give it a new of atestfile.txt B: copy the following text into a new zorro script.
Now save as atest.c and select EURUSD for the test currency and then run the script. Now open in notepad the file \log\atest_EURUSDtest.log you should get something like this:
[3: Wed 02.01. 12:00] 1.46532 ALLDONE! etc etc etc...IE No printing of the buff string.
now go back and comment out the if(is(INITRUN)) so it looks like this: //if(is(INITRUN)){ string buff = file_content("History\\atestfile.txt"); printf("# \n %s80 \n", buff); //}
So now after all of this.... I am stupid, because I use printf alot for debugging and I thought I was crazy trying to debug this and the log results would change. Turns out the printf doesn't print if you inside the if(is(INITRUN)) for somereason. Oh.. and you can change it to be a main() instead of a run() and it does the same thing. I've attached a zip file with 4 files, 2 .c and 2.log files that show the results I'm getting. Hopefully this can be repeated and fixed next release.