"private" variables for one script file only
[...] Time for a new proposal! ^^'
What about adding "private" variables (and/or functions) which can only be accessed from the script file they're in? That could be useful for functions which (for example) create the same table over and over again - the function would just have to create that table once.
Comments (6)
-
-
Planned for MobTalkerScript 2.0.0 and will come with an overhaul of the engine. Will take quite some time until then, unfortunately.
-
- changed status to on hold
-
reporter I think it's time to bump this issue because, well, we're already at MTS 3.0.2... And, as far as I remember, there are local functions and variables, yes, but not for separate script files.
-
locals are local to their respective script files. "globals" are visiable across all script files, but not other scripts. So I guess it's already implemented.
-
- changed status to closed
- Log in to comment
I actually did plan on doing that. That would ease creating modules and libraries.
The way I'm planning to do it is allowing not only functions and labels on the top level, but normal code also (like a lot other languages do), so you could declare local variables (and even "private", local functions) at the script level.