"private" variables for one script file only

Create issue
Issue #14 closed
mezzodrinker created an issue

[...] 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)

  1. Chimaine

    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.

  2. Chimaine

    Planned for MobTalkerScript 2.0.0 and will come with an overhaul of the engine. Will take quite some time until then, unfortunately.

  3. mezzodrinker 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.

  4. Chimaine

    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.

  5. Log in to comment