Plugin calling function in other installed plugin

I have a few of my own plugins installed, and some of them have generic functions with the same names. I’ve recently been running into the issue that PluginA can call a get_layers(), and end up running the get_layers() function in PluginB, which often causes issues, due to globals being set to ‘nil’, since PluginB wasn’t running.

It’s all a little odd, but basically running PluginA has a chance to run functions from PluginB, just because they share the same name. Does anyone know any good way to mitigate this? Or whether this might be a bug?

I could rename them all, but in theory this could still happen between one of my plugins, and one made by someone else. I suspect changing all my functions to be local would work, but that requires them to be ordered in a very specific way to even work, which is more of a hassle than I want to deal with.

Thanks!

I’ve run into the same problem :frowning:
The plugins were importing shape files but one was the Ultima VII shape format and the other the Ultima VIII shapes, so very similar but just not similar enough (and for two different projects). So I’ve taken the local way to solve it.

Good to know it’s not just me that ran into this! I’ll probably have to painstakingly go through all my plugins and ‘shuffle’ all the neatly organized functions to make them local as well in that case. Pain. :tired_face: