Is there a way to find what version of Lua WoW is using?
A common problem that plagues me is not being able to control what pairs and ipairs is targetting when used with metatables. I tend to use a "proxy" table attached to a metatable and use __newindex and __index to move all key and value pairs to a separate table to better control the behaviour of data being passed to and from the table.
But this breaks pairs and ipairs and I noticed that in Lua 5.2+ you can have metamethods for these functions: http://lua-users.org/wiki/GeneralizedPairsAndIpairs I was wondering if this is supported in WoW, or in general how can you find out the Lua version used in WoW. I will test this out after the holidays when I have some time but doubt WoW would support it tbh. |
Damn. Managed to test it out and sadly it's not supported. Still, is there a way to find what version of Lua is being used?
|
The last reported update I know of was from 5.0 to 5.1 with patch 2.0.
|
Quote:
|
Quote:
You should be able to write your own table class with its own iterators, though they will never be seamlessly dropped in place of normal tables. |
Quote:
That'll have to do for now. I've heard that 5.1 supports a metamethod for __next but I'd rather not have to always use next() for everything just for the sake of being safe. |
For future reference you can check the lua version in game with the following line. And as previously stated they are still running Lua 5.1.
Lua Code:
|
All times are GMT -6. The time now is 08:27 PM. |
vBulletin © 2024, Jelsoft Enterprises Ltd
© 2004 - 2022 MMOUI