View Single Post
11-21-13, 07:13 AM   #15
Clamsoda
A Frostmaul Preserver
Join Date: Nov 2011
Posts: 269
I don't see why that wouldn't work, but I'd rather use this approach:

Code:
print(format("If this function works, your aspect ratio is %.2f.", aspectRatio))
By keeping everything you want to print inside of the first argument of format, you have finer control of what is printed, and how. I have highlighted the pattern that the Lua interpreter will recognize, as well as the variable that will be inserted where that pattern is, to ease the understanding.

The format function, and the patterns it recognizes are FAR from intuitive. I highly suggest reading further into the topic on WoWPedia and in official Lua documentation.

Last edited by Clamsoda : 11-21-13 at 07:18 AM.
  Reply With Quote