I need a global variable accessible by all functions. Just the one!
Where in my add on should I place
my variable = 15
?
Where do I set up a global variable?
Moderator: Moderator
Where do I set up a global variable?
MADNESS rocks
Re: Where do I set up a global variable?
you cna define it form anywhere, i'd say the load hook though, and you make one explicitly this way: _G.foo = bar
[tome] joylove: You can't just release an expansion like one would release a Kraken XD
--
[tome] phantomfrettchen: your ability not to tease anyone is simply stunning
--
[tome] phantomfrettchen: your ability not to tease anyone is simply stunning

Re: Where do I set up a global variable?
Thanks.darkgod wrote:you cna define it form anywhere, i'd say the load hook though, and you make one explicitly this way: _G.foo = bar
After a bit of experimenting, I realised I had to call it every time as _G.foo (duh!), not just foo.
MADNESS rocks