Error in script

Can anyone see why this isn’t working? I have tried putting () around it and that won’t work either. I am out of ideas.

set 45 name = [:pick [/queue simple get 45 name] 0 28]."-RES"

Thanks

Or if this doesn’t work is there any way and can take two variables and add them together.

:local v1 “firstname”
:local v2 “lastname”

:local FN v1+v2

I tried the + and the . and I can’t get either of them to work.

Thanks

For anyone else that needs this I got it figured out.

:set name ($v1 . $v2)

Right :wink:


And for your first question:
You cannot use item numbers (like the 45) in scripts. You have to use the “find” command to find the entry you want to work with using some “find-able” identifier (which could include a comment you put on this very specific entry).

Just for example:

/queue simple set [/queue simple find target-addresses=192.168.1.17/32] name = [:pick [/queue simple get [/queue simple find target-addresses=192.168.1.17/32] name] 0 28]."-RES"

Does that help?

Best regards,
Christian Meis