When you want to execute a command in the mikrotik terminal, you need to escape the question marks with backslash \?
Code: Select all
:local result [/tool fetch mode=https url="https://10.10.10.10/xml/json.php\?mode=all&id=102" http-method=get user=username password=password as-value output=user port=443;]; :local varData ( $result->"data" ); :put [:pick $varData 305 310];
Code: Select all
[ros_command(":local result [/tool fetch mode=https url=\"https://10.10.10.10/xml/json.php\?mode=all&id=102\" http-method=get user=username password=password as-value output=user port=443;]; :local varData ( $result->\"data\" ); :put [:pick $varData 305 310]; ")]
Now I want to put it all into a dude function, but I get a parce error.
Who knows the differences between labels and dude functions syntax?