View Single Post
10-14-20, 04:57 PM   #11
SDPhantom
A Pyroguard Emberseer
 
SDPhantom's Avatar
AddOn Author - Click to view addons
Join Date: Jul 2006
Posts: 2,324
Explaining the error is a little complex, but passing a string to your function made the call end up like this.
Code:
("AchievementFont_Small"):SetFont(GMFONTS["B"],12)
When you index a string like a table, Lua redirects to the metatable for strings, the string library. The code above would then transform to this internally because of how colon notation and metatables work.
Code:
string.SetFont("AchievementFont_Small",GMFONTS["B"],12)
There is no string.SetFont(), so Lua throws an attempt to call nil error.
__________________
WoWInterface AddOns
"All I want is a pretty girl, a decent meal, and the right to shoot lightning at fools."
-Anders (Dragon Age: Origins - Awakening)
  Reply With Quote