Originally Posted by SDPhantom
This is a modification to string.format() made by the WoW API and isn't normal for Lua itself. I needed to explain the inline condition used here before explaining this so you get the idea. The inline condition decided whether or not to insert the 4th arg into the string, making the identifiers for the 5th and 6th args prone to shifting. Manually selecting which arg the identifier references fixes this problem.
|
This is actually an upstream port from Lua 4.0 to WoW's version of Lua 5.1 - no idea why it was removed from Lua after 4.0, but it's obviously useful for localization purposes.