Problem with script on 3.6 using run command

This code runs OK when pasted into terminal:

:if {$startup!=1} do={/tool e-mail send subject=“Test” body=“” to=“test@domain.pl”};

When I paste it into new script and execute a run command nothing happens. What’s going on? Why is it running from command line but not when in script?
This is happenig after upgrade to ROS 3.6

Hi,

Is that the entire script?
SHow me what else you have.
You may just need a ‘get’ command here and there to establish the framework that your IF statement runs on.

Can also contact me on MSN (see my user profile) if you have questions.

-Krige

OK. I finally solved it.I needed

:global startup;

at the beginning of the script. Don’t know why though, it worked without it in 2.9