[Closed] Include file scope
I find my script can not find the function I declared in the include file(I use “include” in my script). I know it’s due to the problem of scope.But I do find someone else had done this(find in OrgeExporter Scripts)–call the function declared in the include file . Anyone can help?
include() will keep the current scope – it works like pasting the content of the included file at compile time.
If you copy and paste the function from the included file in place of the include() statement, does it work? If it does not, you might have a general scoping issue that is unrelated to the use of include()…
Does this reply too later? My recent situation is not convenient for a internet connection.
So it can solve my problem . But what I really want to know is how to let my current working scripts read the fuctions in the included files. My idear is “I want to keep my scripts clean and pleasing to the eye(artistic) ” . So I really want to keep some of those functions in the included files. There is an example scripts (can be found in OrgeExporter which is used for export mesh files for ogre engine). I have tried myself , but haven’t figure out how it can do so .(Besides , I learn a lot from your scripts Bobo . Thanx:P)