So... a simple thing is not working, and I'm not sure why.
Basically, I'm trying to grab a reference to a given Game_Interpreter object, for later use. In the function for executing a command, I stick a single line of code, to set a plugin variable to the current interpreter instance via the "this" keyword.
However, the variable is still "undefined" even after that line. There is no error, and as far as I can tell, nothing that should be preventing me from doing what I'm trying to do.
Odd thing is, the variable SHOULDN'T be undefined at all, I initialize it to an empty object at the very start of the plugin.
I would VERY much like to figure this out, since my plugin does need access to the currently running interpreter instance to do what it's designed to do without any extra requirements for use.
If any more detail is required, I'm grabbing the interpreter instance every time a command is to be executed, since the only time I actually need access to the interpreter is while running a plugin command. And unless I miss my guess, there is generally only one main interpreter active at a given time, and there is no "universal" one. This means I need to have a reference to the specific one currently executing the plugin command. I do intend to restrict the reference grab to ONLY when this plugin's commands are being ran, but for now I'm just trying to get the basic stuff working.
As always, any and all assistance is appreciated! Thanks in advance!
Basically, I'm trying to grab a reference to a given Game_Interpreter object, for later use. In the function for executing a command, I stick a single line of code, to set a plugin variable to the current interpreter instance via the "this" keyword.
However, the variable is still "undefined" even after that line. There is no error, and as far as I can tell, nothing that should be preventing me from doing what I'm trying to do.
Odd thing is, the variable SHOULDN'T be undefined at all, I initialize it to an empty object at the very start of the plugin.
I would VERY much like to figure this out, since my plugin does need access to the currently running interpreter instance to do what it's designed to do without any extra requirements for use.
If any more detail is required, I'm grabbing the interpreter instance every time a command is to be executed, since the only time I actually need access to the interpreter is while running a plugin command. And unless I miss my guess, there is generally only one main interpreter active at a given time, and there is no "universal" one. This means I need to have a reference to the specific one currently executing the plugin command. I do intend to restrict the reference grab to ONLY when this plugin's commands are being ran, but for now I'm just trying to get the basic stuff working.
As always, any and all assistance is appreciated! Thanks in advance!