Originally Posted by myrroddin
Doing some random testing on libs, trying to get the major, minor to print and see the values. Boredom~
Anyway, I got nil errors for these, yet LibStub loads the lib properly if you remove the print statements:
Code:
local major = "LibUtilities-1.0"
local minor = "$Revision: 10000 $"
local lib = LibStub:NewLibrary(major, minor)
print("major: %s"):format(major)
print("minor: %s"):format(minor)
print("minor: %d"):format(tonumber(minor))
if not lib then return end
|
Running something like
print("major: %s"):format(major) makes the ChatFrame show
major: %s and throw an "attempt to index nil" error since
print() doesn't return anything.
Originally Posted by Seerah
Lua Code:
print("your text here":format())
|
This causes Lua to throw a syntax error. As a quirk, the string needs to be encased in parenthesis in order to function.