...which obviously does not exist. Several escape sequences actually produce some effect, such as \n for a new line, and \t for a tab, though WoW ignores these in many contexts (eg. newline characters in chat messages are ignored).
To avoid this issue with file paths, you can either escape your backslashes by adding a second backslash in front of each one, as in my example above, or you can use doubled square brackets instead of quote marks to enclose your string, as in:
This is similar to the syntax for multi-line comments:
--[[
This is a really
long comment.
]]
As with comments, if your string contains literal square brackets, you can modify the opening and closing delimeters by adding equal numbers of equal signs between the brackets on both ends:
myString = [=[This string has "quotes" and "[[brackets]]" in it!]=]
Looking at other addons that use the library is generally a better idea than trying to find documentation about the library. WoW library authors tend to either write no documentation at all, or use Luadoc to auto-generate documentation from comments in the code, which usually results in documentation that reads like something BabelFish might have spit out in 1995. :(
Rollback Post to RevisionRollBack
To post a comment, please login or register a new account.
local _fontName, _fontSize = "Interface\AddOns\ElvUI\media\fonts\Action_Man.ttf",13
But no luck. Any ideas?
Also, note that the backslash is a "magic character" in Lua strings, causing the character immediately following it to be escaped. Thus, your string:
"Interface\AddOns\ElvUI\media\fonts\Action_Man.ttf"
...is interpreted as this:
"InterfaceddOnslvUIediaontsction_Man.ttf"
...which obviously does not exist. Several escape sequences actually produce some effect, such as \n for a new line, and \t for a tab, though WoW ignores these in many contexts (eg. newline characters in chat messages are ignored).
To avoid this issue with file paths, you can either escape your backslashes by adding a second backslash in front of each one, as in my example above, or you can use doubled square brackets instead of quote marks to enclose your string, as in:
[[Interface\AddOns\ElvUI\media\fonts\Action_Man.ttf]]
This is similar to the syntax for multi-line comments:
As with comments, if your string contains literal square brackets, you can modify the opening and closing delimeters by adding equal numbers of equal signs between the brackets on both ends:
myString = [=[This string has "quotes" and "[[brackets]]" in it!]=]