LTSpice "Error: undefined symbol in:" Problem

First time posting and I really hope I selected the correct category.
Below is my schematic for a relay SPDT symbol I’m creating.

You may notice I’m not yet very proficient with LTSpice. Getting past that, You’ll notice the spice directive on the top right corner. What I’m trying to do is this:

  1. Regardless of what voltage POS is, V4 = 5 unless POS=<0

    • Here I thought the expression u(POS) * 5 would work because u() returns 0 or 1 depending if the parameter is 0 or > 0
  2. Since it is SPDT both electronic switches (ADG1201) have the same input COM1 but each has a different Output. The switch turns on when Mom = 5. So U1[In] =0 and U2[In]=5 when Mom = 5. Also, U1[In]=5 and U2[In]=0 when Mom=0
    -Here I tried to modify the expressions with the .func statement along with If statements.

In my test Circuit, the Spice Error log reads:
Questionable use of curly braces in “v4 n004 0 {z}”
Error: undefined symbol in: “[z]”
Questionable use of curly braces in “v5 n006 0 {y}”
Error: undefined symbol in: “[y]”
Questionable use of curly braces in “v6 n005 0 {x}”
Error: undefined symbol in: “
Questionable use of curly braces in “v4 0 {fnvoltmod(v(pos))}”
Error: undefined symbol in: “(if((v)>0,z=u((v(pos)))*5))”
Questionable use of curly braces in “v5 0 {fndecy(mom)}”
Error: undefined symbol in: “(if(([mom])>0,y=0,y=5))”
Questionable use of curly braces in “v6 0 {fndecx(mom)}”
Error: undefined symbol in: “(if(([mom])>0,x=5,x=0))”
Fatal Error: Multiple instances of “V:x1:4”

I wouldn’t ask this question if I hadn’t already searched the web for an answer. I think I don’t understand how to use Spice Directives on a schematic properly. I’ve read the LTSpice help and expanded help on the wiki site - but I can’t seem to find schematic rules with spice directives.

In short, Please help me understand.

Thank you in advance
Robert

I am not able to help you with this set of errors. Is there anyone out there who is familiar with using spice models?

I’ve also posted this in stack exchange

https://electronics.stackexchange.com/questions/556978/follow-up-ltspice-errorundefined-symbol-in-problem

I received a decent answer but I’m still having this issue. The link above shows where the problem is at now.

I know quite a bit about LTSpice, what exactly are you trying to accomplish with those expressions in the curly braces? This might help me understand.