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.