A while back Nick had posted for me that I could use the _VERSION internal variable to determine the version of LUA, due to some altering syntax after version 3.80 of MUSHclient.
I was wondering if this would work if placed in my plugin at the beginning where all the SCRIPT initialization takes place, i.e. prior to ANY function definitions?
This would be placed in my spellup plugin, so that IF IT WOULD WORK, I could distribute only the ONE version, and it be compatable. I have been informed by someone using 3.80 or higher that it presents an error message when using the string.gfind function, stating that it has been changed to string.gmatch, and am only inquiring as to the ability to OVERWRITE that by setting the "pointer" string.gfind to use the newly named string.gmatch... ?
I would test this myself but am still using 3.74, mostly for compatibility issues cause there are several people using 3.74-78 that use my plugins, and keep a few versions back for compatibilities sake.
Thanks,
Onoitsu2
I was wondering if this would work if placed in my plugin at the beginning where all the SCRIPT initialization takes place, i.e. prior to ANY function definitions?
if string.sub(_VERSION,1,7) == "Lua 5.1" then
string["gfind"] = string.gmatch
end -- ifThis would be placed in my spellup plugin, so that IF IT WOULD WORK, I could distribute only the ONE version, and it be compatable. I have been informed by someone using 3.80 or higher that it presents an error message when using the string.gfind function, stating that it has been changed to string.gmatch, and am only inquiring as to the ability to OVERWRITE that by setting the "pointer" string.gfind to use the newly named string.gmatch... ?
I would test this myself but am still using 3.74, mostly for compatibility issues cause there are several people using 3.74-78 that use my plugins, and keep a few versions back for compatibilities sake.
Thanks,
Onoitsu2