I am working on AMPScript for an email greeting for the first time. I'm trying to make it so if we don'thave a specific First Name (Preferred Guest), the default is Greetings, otherwise it should be First Name. When I run the code, the error I get is that the IF statement is not closed... but I have %%[ENDIF]%% .... Thoughts?
<script runat=server language=ampscript> %%[ Var @fname Set @fname = FirstName ]%%%%[if @fname =="Preferred Guest" then]%% Greetings, %%[else]%% %%= v(@fname) =%%%%[ EndIf ]%% </script>