I would like to ask for some help with my script, as the values on the main line are not reset at the end of the script.
In the last IF branch, after ELSE, it does not jump back to the main branch, but it is paramount that when the /file remove command is run, if commented, it jumps back perfectly.
It is important to delete the file, how could this be resolved to actually delete it, so not just make the text file empty and still jump back to the main branch.
:global dummy;
:local $file "asd.txt";
:set $dummy 1;
:local ping [/ping 8.8.8.8 count=8 size=64 interval=1500ms];
:if ($ping = 0) do={
:log info ("Do sth if ping was not successful");
} else={
:log info ("here it is the else branch :D");
/file remove $file; # If the /file remove is commented we goes back to the main branch.
}
:set $dummy 0; # Nothing happening here if /file remove not commented.
Who told I never created for example from Terminal??
It was a dummy script, because I don't want to share my real code.
About the script full of errors, I had 0.01 sec to write this topic
Btw, thanks for your reply, it was very useful, but I've figured it.