Community discussions

MikroTik App
 
itsc
just joined
Topic Author
Posts: 2
Joined: Thu Dec 09, 2010 9:20 pm

New Function

Thu Dec 09, 2010 9:58 pm

How to write new function in list of functions and do not use build-in functions or maybe it possible to change functionality of build-in functions?
 
lebowski
Forum Guru
Forum Guru
Posts: 1619
Joined: Wed Aug 27, 2008 5:17 pm

Re: New Function

Wed Dec 15, 2010 2:02 am

what would you have the self built function do?
 
itsc
just joined
Topic Author
Posts: 2
Joined: Thu Dec 09, 2010 9:20 pm

Re: New Function

Wed Dec 15, 2010 11:39 am

I need to find all indexes of elements in array, that match some criteria, and I used the function array_find(), but it returns only one first found index. How make it work, like I need?
 
lebowski
Forum Guru
Forum Guru
Posts: 1619
Joined: Wed Aug 27, 2008 5:17 pm

Re: New Function

Wed Dec 15, 2010 5:48 pm

Yeah probably a question for gsandul but there is no while or loop function so I don't know how you would make it work past the first match.
 
User avatar
gsandul
Member Candidate
Member Candidate
Posts: 154
Joined: Mon Oct 19, 2009 1:42 pm

Re: New Function

Thu Dec 16, 2010 9:33 am

Yeah probably a question for gsandul
:lol:
But you are right "no while or loop function" in The Dude. And no way to find all indexes of elements in array.
 
lebowski
Forum Guru
Forum Guru
Posts: 1619
Joined: Wed Aug 27, 2008 5:17 pm

Re: New Function

Fri Dec 17, 2010 9:45 pm

You could check out trying to call an external with a probe...

Just search the dude forum for
snmp execute