Hi all,
I have problems with the following instruction in a script running on routerOS v3.x
:local NUMMO ("xxx","yyy","zzz")
it works on v2.9.50 .
anyone can help me?
thanks
Hi all,
I have problems with the following instruction in a script running on routerOS v3.x
:local NUMMO ("xxx","yyy","zzz")
it works on v2.9.50 .
anyone can help me?
thanks
got it!
just omitted the comma between array elements:
:local NUMMO ("xxx" "yyy" "zzz")
not so sure it’s the real solution!
help me please
I can’t find the solution for the problem…
is there anyone who can give me an hint?
thanks
:local NUMMO [:toarray "xxx,yyy,zzz")
this will work
thanks mrz
… I’m going to try it right now!
is it normal that from the following script:
:log error [ :find "a,b,c,d" d]
I get the result: 6
and from the other following:
:log error [ :find "a,b,c,d" c]
I get: 4
??? ![]()
PS: I’m using ROS 3.6 on intel x86 machine
Yes this is normal, because you are searching string
“d” is 6-th char in string and “c” is 4-th, all chars are counted including “,”
you’re right..
but if I try:
:local NUMMO ([:toarray "jan;feb;mar;apr"])
:log error [ :find $NUMMO mar]
I don’t get “2” as I should get (am I right?) ![]()
I obtain empty value in logs.
still thanks
{
:local NUMMC [ :toarray "jan,feb,mar,apr" ];
:put [ :find $NUMMC "mar" ];
}
I get correct value - 2.
thanks thanks thanks
![]()
it works!