Jump to content

[Question] How does setGlobal and getGlobal work ?


celludriel

Recommended Posts

I added a setGlobal in one script that runs on server startup, then tried using that global in a script attached to a script with getGlobal.  But its always nil

 

Are those globals just global in one script run, or are they global over the game instance ?  If they are just global in one script run, I'm so very very boned ....

Link to comment
Share on other sites

Aaargh this is frustrating, you can't use an array as a global variable {}.  This sucks , it's one of the most important things you want an associative array you can use as context to reach in your entire application.

 

Think springbeans in the springcontext if you would talk java.  Or just basic IOC design in any other programming language .... grmbl ...  I guess I could work with tons of prefixed variables in the global array as string ... but that is just messy ...

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...