View Single Post
Old 09-24-12, 03:16 PM   #5
Phanx
A Pyroguard Emberseer
 
Phanx's Avatar
AddOn Author - Click to view addons
Join Date: Mar 2006
Posts: 3,675
%s and %d are standard Lua string formatting tokens.

http://pgl.yoyo.org/luai/i/string.format
http://www.wowpedia.org/API_format

%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