View Single Post
11-15-16, 07:19 PM   #27
Torhal
A Pyroguard Emberseer
 
Torhal's Avatar
AddOn Author - Click to view addons
Join Date: Aug 2008
Posts: 1,196
Originally Posted by SDPhantom View Post
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.
__________________
Whenever someone says "pls" because it's shorter than "please", I say "no" because it's shorter than "yes".

Author of NPCScan and many other AddOns.
  Reply With Quote