Quantcast WoWInterface - View Single Post - Lua macro tutorial
View Single Post
Unread 09-24-12, 03:16 PM   #5
No Life!
Phanx's Avatar
AddOn Author - Click to view addons
Join Date: Mar 2006
Posts: 5,189
%s and %d are standard Lua string formatting tokens.


%s means "convert the provided value into a string and insert it here". string.format("Hello, %s!", "world") is the same as "Hello, " .. "world" .. "!" but more localization-friendly, more flexible, and more powerful.

%d means "round the provided number into the nearest integer and insert it here".
Author/maintainer of Grid, PhanxChat, ShieldsUp, and many more.
Troubleshoot an addonTurn any code into an addonMore addon resources
Need help with your code? Post all of your actual code! Attach or paste your files.
Please don’t PM me about addon bugs or code questions. Post a comment or forum thread instead!

Last edited by Phanx : 09-24-12 at 03:19 PM.
Phanx is offline   Reply With Quote