Get/Set value to queue tree

Hi… I have some questions in mikrotik scripting:

How to get the value (max limit) in queue tree using name (find name)?

How to set the value (max limit) in queue tree using name (find name)?

And lastly.. how to add a variable…like: A = A + 10; (example in VB)…

Thanks…

Some like this?

:put [/queue tree get p2p-dw max-limit]
80000000

This is then the max-limit setting for queue tree p2p-dw.

To get it inn to an variable info

:local info  [/queue tree get p2p-dw max-limit]

To test it

[
:local info  [/queue tree get p2p-dw max-limit]
:put $info
]

Some math

[
:local info  [/queue tree get p2p-dw max-limit]
:put $info
:local test ($info+50000)
:put $test
]

okie, looks like it just read the value of max-limit…
i want to change the value of max-limit through the script…

example:
read the value of max-limit into a variable
subtract variable into something like 3
write the value of variable to max-limit in queue tree…

Just use set instead of get

[
:local current [/queue tree get p2p-dw max-limit]
:local new ($current+50000)
/queue tree set p2p-dw max-limit=$new
]

Or all in one line without using variables.

/queue tree set p2p-dw max-limit=([/queue tree get p2p-dw max-limit]+50000)

Thanks… its working..

But I have another question:
How to round off a number? Is there a round off function in mikrotik script?

example:
15,432,005 → round off → 15,000,000

14,834,645 → round off → 14,500,000

round off to 500k…

anyway, i solve the round off thing.. thanks man..