Registering global variables

Hi, could someone help me with this script…

:if ($check != [:nothing]) do={ 
:log info "variable registered..." 
}else={ 
:log info "registering variable..." 
:global check 0 
}

if…do part is functional and registering global variable in script is functional too, but if I join these two parts it doesn’t work…

I need this global variable in other script and I don’t know how ensure registering global variables after reboot…

Thanks

:if (("." . $check . ".") != "..") do={ 
:log info "variable registered..." 
}else={ 
:log info "registering variable..." 
:global check 0 
}

Eugene

works perfect
thank you