Script works in console, not as 'script'

Hi,

We’re running the following script on a scheduler:

:log info ("TX: " . [int wir reg get 0 tx-ccq ] . ", " . [int wir reg get 0 tx-signal-strength] . " , " . [int wir reg get 0 tx-rate ]. ", RX: " . [int wir reg get 0 rx-ccq ]. ", " . [int wir reg get 0 rx-rate ]. ", SIGNAL: "  . [int wir reg get 0 signal-strength ]. ", " . [int wir reg get 0 signal-to-noise ]. " , FRAMES: " . [int wir reg get 0 tx-frames-timed-out ].  ", ". [int wir reg get 0 p-throughput ]. ", UPTIME: " . [int wir reg get 0 uptime ]);

The script runs just fine in terminal. We also had it running for several hours on the scheduler. Suddenly, it stops printing values, and just print static data.
The script was running once a second for debugging some connection problems.

For 4 hours it prints similar to:

TX: 99, -54 , 24.0Mbps, RX: 100, 24.0Mbps, SIGNAL: -53dBm, 58 , FRAMES: , , UPTIME: 02:08:09

After that and for the following hours, it’s been printing:

 TX: ,  , , RX: , , SIGNAL: ,  , FRAMES: , , UPTIME:

Like I said, if we do a simple cut n’ paste for the script and run it in console, it writes fine.
It runs as admin with all privileges.

Any ideas?
Routerboard is RB411AH, running ROS v5.6 and firmware 2.29. I.e. the latest versions.

edit: Some extra notes. We run the exact same script on 4 bases which are all powered off during the night. 2 of those stopped logging before the powerdown right around a disconnect. The other 2 hits this problem when powered back on this morning. It looks like all 4 suffer the problem that when device ‘0’ is disconnected, it never manages to pick up those numbers again once it reconnects.


Fun fact #2:
Running ‘/system script run LOG’ everything works fine.
If I run the script by clicking “Run Script” in WinBox, data fields are blank.

as discussed many times, you cannot use console numbers to get an item. You have to use find:

[/interface wireless registration-table get [find interface=“wlan1”] tx-ccq]