*Thought I'd start things off with a (probably sloppy;)) bit of code I just wrote, 2nd day of using filtermeister so Im not exactly an expert ;). - Bob Oat
---- = Example = this writes the contents of an array to a text file. Could be used for any output, I just like having the contents of the entire array sitting in front of me in a nice text file :) ---- <code> OnFilterStart: {allocArray (0, 200, NULL, NULL, 4); //initialise 1d array return false; }ForEveryTile: {int temp, output, aContents; for (x=0; x<200; x++) { putArray(0,x,NULL,NULL,100); //fill the array with '100' } //create a file named debug.txt, set it to append, loop through the array printing out the values to the text file for(x=0;x<xmax;x++) { aContents=fopen("c:\\debug.txt", "a"); temp=getArray(0,x,NULL,NULL); fprintf (aContents, "%d:%d\n",x,temp); fclose(aContents); } return true; }</code> |