Save the rx-bits-per-second in the variales

Hi guys,
I am a programer in the Microsoft platforms and I need to try scripting in the mikrotik router OS.
In order to start I need to get the tx/rx of my pppoe users in the mikrotik interface.

For this Case I crate the script with this syntax:
/interface monitor once do={

}

When I run this script in the mikrotik new terminal I got the total statistic of this user in the Mikrotik New Terminal
name:
rx-packets-per-second: 0
rx-drops-per-second: 0
rx-errors-per-second: 0
rx-bits-per-second: 1093bps
tx-packets-per-second: 0
tx-drops-per-second: 0
tx-errors-per-second: 0
tx-bits-per-second: 1823bps

Now I need to save the tx-bits-per-second in the tx variable and save the rx-bits-per-second in the other variable as well.

When I used this syntax for saving the tx and rx in my variables or write this parameters in the log I got the error…!!!

:log info tx-bits-per-second
:local u
set u tx-bits-per-second



Please advice me.
Thank you in advance.

This will save tx and rx-bits-per-second as variables and then write them to the log.

/interface monitor <pppoe-smit> once do={
	:local txbps $("tx-bits-per-second");
	:local rxbps $("rx-bits-per-second");
	:log info $txbps;
	:log info $rxbps;
}