[ENH] Allow comments in Function() style variables
DrakeAedus opened this issue Β· 4 comments
π΅ Desktop (please complete the following information):
- OS: Windows 10
- Game Version retail (9.1.5)
π΅ GSE Version:
- Version: 3.0.60
- Downloaded From: https://www.curseforge.com
Thank you, true / false variables and IF blocks are working for me now.
Turns out comments are not supported in the macro variables because I also got this to work as intended:
function()
local covenantID = C_Covenants.GetActiveCovenantID();
if covenantID == 1 then
return "Kyrian"
elseif covenantID == 2 then
return "Venthyr"
elseif covenantID == 3 then
return "Night Fae"
elseif covenantID == 4 then
return "Necrolord"
else
return "None"
end
end
But adding any comments returns the whole thing as a string.
Going to change this to an enhancement and will have this sorted in the next few days
Hi Drake,
mate you adding NightFae to an action block or are you using it with an IF block?
You need to be using an IF block.
You create this and DONT ADD it to an action block like an ordinary variable. Just change tabs out and back and then the ability to add an if block should enable.
You add an IF block in GSE 3 and select the variable at the top of the block and then put your cast line in the true action while you either delete the false action or do something else there.