You cannot include a file in the include file does it have something to do with that I think basic.grg is included in the advanced or what its called is that why?
Would be nice to solve this puzzle as I'm building up quite a lot of various utillity functions that are not allways used, so it would be nice to have them in thier own single include file instead of one massive include file.
From my experience it's one #include file command per script. The rule is that the #include command needs to be the last command in the script so if you have two #include commands, the first one ISN'T last (if you see what I mean) thus the error.
However, a partial solution might be to create several copies of your"Core" include file, and inside each copy include a 2nd #include file containing a subset of related functions. Then, depending on the script, choose the Core file with the secondary #include file that contains the extended functions your script needs.
Or you could solve it the opposite way so that you'd have a number of unique #include files all of which would then include the same Core #include file, providing universal functions they all (including the script) need .
Any function calls inside your script will then find and utilize functions contained in either level of #include file.
Just make sure that the #include command in the first include file precedes the first function definition.
It's gonna get a bit messy because I like to split everything up and only use what's needed, so it's going to be more than 2 includes down the line. Utility modules, arrays, strings, math,brushes, color, my constants (True, False, DEBUG etc..)
Just the way I'm used to work in other languages, anything that's repeated more than once I create functions for and debug them so I know they work, then I don't have to recode that next time I'm doing something similar and I know the code is tested to work. After a while I can whip up anything in no time when ideas strike because there's speciality functions for everything. It does slow you down when starting on a new language but it pays in the end.