I fear that I may be in the wrong forums; however, it wasn't obvious to me from the battle.net website where this question would go. Thus, if it must be moved, my apologies in advanced.
I'm working on an add-on that uses a "/slash command" to preform a set of operations. I'm not entirely too familiar with how WoW preforms LUA script execution OnLoad compared to In Game; however, when I type the "/slash command" to preform my operation - does the script run each time, real time, in its entirety - or does it preform some caching of objects?
To place this in context, I'm working on an Addon that uses GetContainerNumSlots() API call. My question is about weather or not I will have to worry about "refreshing" my object's variables that uses GetContainerNumSlots() in the event that something changes between when the AddOn first loads to when the AddOn is ran.
An example would be the following:
1. I login; there are 15 slots in my bag. My Initializer Function runs OnLoad, and GetContainerNumSlots() sets 15 in my object's constructor.
2. I buy a [Fishing Pole] - I now have 14 slots in my bag.
3. I run my AddOn using the "/slash command" - is there 15 slots in my bag, or is there 14 slots in bag?
From testing, I feel as though it is the latter, 14 slots in my bag (which is correct), as scripting languages don't need to be "compiled" per say; however, I just want to be absolutely certain.
Thanks again for your time!