Script translation ROS 5.x -> ROS 6.x

hi,

i have received the 1st CCR router and was going to paste compact exported configuration from ROS 5.x which did fail due to changes in syntax. the syntax changes in the config i can possibly overcome employing a nice text editor and replace or remove certain parts but the scripts are written by someone else and beyond my knowledge and skills. is there a way to ‘translate’ them to work on ROS 6.x ? the scripts that are mission critical for us are here:

http://www.mikrotik-routeros.com/2010/01/automated-usage-script-without-usermanager/

i also email the original developer to see if he has a solution.

thx
Jan

Print script in terminal, it will highlight where syntax error is.

thx, i will try that !

doing what was suggested i get a red highlight at a colon character but knowing to little about scripting on ROS i have no idea what to replace it with. i will post the part of the code that is involved but i guess that would go beyond the focus of this forum if i asked every time when i come across a highlighted part of code.

the highlight is the 1st colon character here between n and global:

\n:global mailserver\r\

here the part of the script:

add name=overseer policy=ftp,reboot,read,write,policy,test,winbox,password,sniff,sensitive,api source=":global found\r\
    \n:global mailserver\r\
    \n:global adminaddress\r\
    \n:global fromaddress\r\
    \n:local isfqdn\r\
    \n\r\
    \n##################\r\
    \n# User editable Variables #\r\
    \n##################\r\
    \n\r\
    \n# Set all mail variables each time script is run - you should update these details from this script only\r\
    \n# Note you can use a dns name for the mailserver however if for any reason this name does not resolve the script will terminate. This is a known bug in 3.X and 4.X\r\
    \n\r\
    \n:set mailserver \"your-mail-server.domain.tld\"\r\
    \n\r\
    \n# Is the value above a valid domain name ( change to \"no\" if IP address, \"yes\" if it's a name the mikrotik can resolve)\r\
    \n:set isfqdn \"yes\"\r\
    \n\r\
    \n:set adminaddress \"email-address-to-send-admin-reports-to @ yourdomain dot tld"\r\
    \n:set fromaddress \"email-address-reports-come-from @ yourdomain dot tld"\r\
    \n\r\
    \n######################\r\
    \n# End of user editible variables #\r\
    \n######################\r\
    \n\r\
    \n:if ([\$isfqdn] = \"yes\") do={:set mailserver [:resolve \$mailserver]}\r\
    \n\r\
    \n/system script run monthend\r\
    \n\r\
    \n:if ([\$found] = \"true\") do={/system script run monthlyreport; :log info \"--Completed Monthly Report--\"} else={ /system script run usagereport; :log info \"--Completed Usage Report--\"}"

ok, i have found the problem i had. for some reason if i paste a script into the winbox script editor it fails with the \n beginning of the lines where in the commandline it works. the script now is in there the router and executable after a few minor changes.

now i know from the change log the syntax for simple queue has changed. instead of target-address now you have a target. this was not highlighted in the script when i did ‘print’.

regards
Jan