Need help with this macro for Gnomesequencer

So, I am trying to make a macro for my holy paladin to save some space in my bars.

What I am trying to do: Make one button that cast to my mouse over target and that spams Flash of Light, uses Holy Prism and Holy Shock on CD and with a modifier it cast Eternal Flame. Also than when hovering my mouse over an enemy it switches to my offensive spells.

So far I manage to make it spam Flash of Light and use Holy Prism and Holy Shock on CD but for some reason the MOD for Eternal Flame does not work properly and the switch to offensive spells does not really work, when ever i try to work the macro still alternates healing spells…here is the code:

Sequences[‘HolyPala’] = {
StepFunction = [[
limit = limit or 1
if step == limit then
limit = limit % #macros + 1
step = 1
else
step = step % #macros + 1
end
]],
PreMacro = [[
/target mouseover
]],
‘/cast [target=mouseover, exists] [help] [target=player] Holy Shock’,
‘/cast [target=mouseover, exists] [help] [target=player] Holy Prism’,
‘/cast [target=mouseover, exists] [help] [target=player] Flash of Light’,
‘/cast [@mouseover, harm] Denounce’,
‘/cast [@mouseover, harm] Judgment’,
‘/cast [@mouseover, harm] Hammer of Wrath’,
PostMacro = [[
/cast [mod] Eternal Flame
/use [combat]13
/use [combat]14
/script UIErrorsFrame:Hide();
/console Sound_EnableSFX 1
]],
}

So, I am trying to make a macro for my holy paladin to save some space in my bars.

What I am trying to do: Make one button that cast to my mouse over target and that spams Flash of Light, uses Holy Prism and Holy Shock on CD and with a modifier it cast Eternal Flame. Also than when hovering my mouse over an enemy it switches to my offensive spells.

So far I manage to make it spam Flash of Light and use Holy Prism and Holy Shock on CD but for some reason the MOD for Eternal Flame does not work properly and the switch to offensive spells does not really work, when ever i try to work the macro still alternates healing spells…here is the code:

Sequences[‘HolyPala’] = {
StepFunction = [[
limit = limit or 1
if step == limit then
limit = limit % #macros + 1
step = 1
else
step = step % #macros + 1
end
]],
PreMacro = [[
/target mouseover
]],
‘/cast [target=mouseover, exists] [help] [target=player] Holy Shock’,
‘/cast [target=mouseover, exists] [help] [target=player] Holy Prism’,
‘/cast [target=mouseover, exists] [help] [target=player] Flash of Light’,
‘/cast [@mouseover, harm] Denounce’,
‘/cast [@mouseover, harm] Judgment’,
‘/cast [@mouseover, harm] Hammer of Wrath’,
PostMacro = [[
/cast [mod] Eternal Flame
/use [combat]13
/use [combat]14
/script UIErrorsFrame:Hide();
/console Sound_EnableSFX 1
]],
}