Script state ph2 peer ipsec

:if ($CurrentStatusEdok != $LastStatusEdok) do={
:set keepOutput true
:set output ($LastStatusEdok)
/log warning “STATO PEER EDOK=$CurrentStatusEdok”
}

where am i wrong here? how do i set the parameter to the global variable?