i installed CowTip_LuaTexts today and tried to write my old DogTag lines @ LUA
but i have an issue, everytime i get an error like this
-> bad argument #1 to 'format' (string expected, got no value)
here are my lua lines
line 1:
local name = Name(unit)
if not name then
return "UNKNOWN"
else
name = Colorize(("%s"):format(name), ClassColor(unit))
return name
end
line 2:
local level, race = Level(unit), SmartRace(unit)
local class = ""
if UnitIsPlayer(unit) then
class = Colorize(Class(unit), ClassColor(unit))
else
class = ""
end
level = Colorize(level, DifficultyColor(unit))
local diff = ShortClassification(unit)
return "Level %s%s %s %s", level, diff, race, class
line 3:
local guild, _, _ = GetGuildInfo(unit)
local pguild, _, _ = GetGuildInfo("player")
if not guild then
return
else
if pguild == guild then
guild = Colorize(("[%s]"):format(guild), 0, 255, 255)
else
guild = Colorize(("[%s]"):format(guild), 250, 182, 0)
end
return "%s", guild
end
line 4:
if TalentSpecName(unit) and TalentSpec(unit) then
return "%s %s", TalentSpecName(unit), TalentSpec(unit)
else
return
end
line 5:
local name = Name(unit .. "target")
if not name then
return
else
if name == UnitName("player") then
name = "You"
end
name = Colorize(name, SmartClassColor(unit .. "target"))
return "Target: %s", name
end
maybe u find my failure (i'm not that good in lua ^^)
i installed CowTip_LuaTexts today and tried to write my old DogTag lines @ LUA
but i have an issue, everytime i get an error like this
-> bad argument #1 to 'format' (string expected, got no value)
here are my lua lines
line 1:
line 2:
line 3:
line 4:
line 5:
maybe u find my failure (i'm not that good in lua ^^)