(05-13-2017, 05:06 PM)Random Talking Bush Wrote:(05-13-2017, 05:05 PM)Carpaccio Wrote: This one works! Maybe I have some weird problem with my installation for max to cause problems with the other scripts...Certainly is odd, to say the least. I'll continue using the alternative naming setup for that from now on, just in case.
That's why it's better to avoid too common names. Typically we use specific prefixes or long names like e.g. "bfMat" or "bfres_mat" to avoid potential conflicts.
Also that's why it's important to use global variables/function only if it's absolutly necessary. The bad to its "mysterious" crappy script... A global function named "mat' is the worst thing a dev can do...
(Although, the name of my function is not ideal either. Not as risky as "mat" but "vRange" or "rangeLimiter" would be safer for example. Don't release update just for that, just think for the next one).
Anyway, about code improvment, we can optimize its size for sure but not prior (it's already lite), i'll check how we can boost speed again.