Callagrafx:
I didn't say anything because the only thing that I could have said quickly and definitively at the time would have been - don't use this version of Bat4max! It's author is missing, I myself see a lot of, what I perceive as, inconsistencies and excessive coding in script because of which it is a very difficult to find a way around, and the people who release it have no experience, knowledge needed to provide any kind of meaningful support for such a tool. Because support for such a tool is not telling people what button to press, but ability to fix some errors in code that may and will resurface.
Even if I would have been able to fix one function, and I really mean fix this function not simply replace it with mine, it would have taken me a lot of time and sort of made liable to continue provide support, e.g. basically doing your "job". Problem is that I'm not familiar with internal logic of the whole thing... It's just not time efficient. And giving simple indication of where in the script the problem in question starts wouldn't do you any good, now would it? So there was this dilemma...
Now since the Chris is back situation is radically different. I know I don't need to go and simply redo the thing. It would be sufficient to simply point to the spot...
And so I'll proceed to the task at hand:
Chris I believe that the root of the problem is your collection method. You choose to collect by the name (e.g. $nitelite*) and opened yourself for all sort of possible mistakes, or need for excessive checks, which you, in fact tried to make, but still missed some, which in turn resulted in a mistake Jeronij had encountered.
This issue, I believe would be eliminated if you would, well actually do nothing to the previously available function, or if there is still a need for a new one (although I don't see what would that be) followed the logic of previous ones and collected not names, but types (e.g. $lights). This way you wouldn't have a problem of geometry named nitlite* be in your array. and the existing check for prefix would weed out other lights (say those in light rig if that is present in the scene) and targets.
This is, of course a bit of poking in the dark, as I don't quite understand the logic there (what, for instance that array - gNiteLiteon - is collecting things for?) and Myself don't have Max 7 to run the changes through...
But I've presented my logic so you can consider it...
As to the farther development, yep I think we could and should revive the old thread it would provide a continuity in the process.
edit: fixed a meaning altering typo: "wouldn't" to "would"