I am unaware if there is an official way to avoid this. However, there might a workaround...
Take the dns-update code and put it into a new script. Then, call it from the first script using the undocumented :execute command (
http://forum.mikrotik.com/viewtopic.php ... 04#p309004). Something like this:
Main script:
...
:execute script=dnsUpdate
... run checks to see if script succeeded
...
dnsUpdate script:
/tool dns-update dns-server=$dnsIP ttl=86400 name=$ssname zone=$zoneDomain address=newIP
You could also just run the dns-update command in its own script and use a second script would check to see if the script succeeded and respond accordingly. People have done this with a similar Fetch problem:
http://forum.mikrotik.com/viewtopic.php ... 12#p319707
Either way, since you use variables in the dns-update command, I think they will need to be global to pass them between the scripts.