Buffet

Buffet

91.8k Downloads

Well Fed Food Macro Error

cralor opened this issue ยท 2 comments

commented

Describe the bug
attempt to concatenate field 'wellFedFood' (a nil value)

To Reproduce
Create a custom macro like so:

local bests, cache = ...
return "#showtooltip\n/cast item:" .. bests.wellFedFood, "INV_Misc_QuestionMark"

Language
Please specify the language of your wow client: en-US

commented

Hello,
This is most likely because you don't a wellfed food on you.
You can either use a fall back:

local bests, cache = ...
return "#showtooltip\n/cast item:" .. bests.wellFedFood or "6948", "INV_Misc_QuestionMark"

Or return an empty macro:

local bests, cache = ...
if not bests.wellFedFood then
  return ""
end
return "#showtooltip\n/cast item:" .. bests.wellFedFood, "INV_Misc_QuestionMark"
commented

Yup, you're right -- I forgot that was the case. Thanks!