Community discussions

Frequent Visitor
Frequent Visitor
Topic Author
Posts: 91
Joined: Wed Jul 07, 2010 12:26 pm

Problem using :PARSE

Fri Jun 08, 2012 2:05 pm


I was wondering if anyone might be able to tell me why the following script would report "expected variable name (line 1 column 6). It is clearly complaining about the "item" variable but I don't understand why? Can't I use :set in the :parse command?

:local item "xxxxxx";
:local command [:parse ":set item \"yyyyyy\""];
** Information the above error comes from this call **
:put $item;
User avatar
MikroTik Support
MikroTik Support
Posts: 5940
Joined: Wed Feb 07, 2007 12:45 pm
Location: Latvia

Re: Problem using :PARSE

Fri Jun 08, 2012 2:10 pm

because item is not defined. You need to define it before set.

:local command [:parse ":local item; :set item 1"];

Who is online

Users browsing this forum: No registered users and 8 guests