Using GetPluginName() with OnPluginEnable

Posted by Seriley on Fri 12 Nov 2010 01:03 AM — 3 posts, 14,394 views.

#0
Lua

function OnPluginEnable()
Note(GetPluginName() .. " has just been enabled")
end

I found this example (in VBScript, I believe) in the Help file discussion for EnablePlugin. I set one up for OnPluginDisable() too.

What I see is ' has just been enabled'. GetPluginName() is returning "" I believe.

The Help file on GetPluginName says it will return the name of the plugin that is executing.

I know my plugin is executing as I see the note ' has just been enabled' output.

Why does GetPluginName not return the name of my plugin here?

I'm using 4.69 now but noticed it when running 4.67.
Australia Forum Administrator #1
You found a bug!

This was introduced during all the "refactoring" improvements in version 4.62.

Fixed in version 4.70, so that during the OnPluginEnable callback, the plugin knows who it is.
#2
Thanks for your prompt response, Nick