Hi Manish,

Do not worry about the warning message. If your setup is ok, the simulation
will run well.

>From a look at the code lines you've pasted here, the error message is most
probably due to a missing operator in the line below.

{$i  $val(nn) }

This is because both "i" and "val(nn)" are variables and there should be an
operator relating them if the for loop is to make sense.


for {set i 0} {$i  $val(nn) } {incr i}

That aside, you are most probably running a wireless or wired-cum-wireless
simulation. Depending on how your ns is installed, your simulation may not
run, if you are using the random scene generating files. If that happens,
copy your script to the directory "~/tcl/ex/" and run it there. It will
work.

I hope this will help.

Kind regards,

Nicholas Mbonimpa



On Fri, Aug 5, 2011 at 4:44 PM, nicholas mbonimpa <nmboni...@gmail.com>wrote:

> Hi Manish,
>
> Do not worry about the warning message. If your setup is ok, the simulation
> will run well.
>
> From a look at the code lines you've pasted here, the error message is most
> probably due to a missing operator in the line below.
>
>  {$i  $val(nn) }
>
> This is because both "i" and "val(nn)" are variables and there should be an
> operator relating them if the for loop is to make sense.
>
>
> for {set i 0} {$i  $val(nn) } {incr i}
>
> That aside, you are most probably running a wireless or wired-cum-wireless
> simulation. Depending on how your ns is installed, your simulation may not
> run, if you are using the random scene generating files. If that happens,
> copy your script to the directory "~/tcl/ex/" and run it there. It will
> work.
>
> I hope this will help.
>
> Kind regards,
>
> Nicholas Mbonimpa
>
>
> On Fri, Aug 5, 2011 at 3:17 PM, manishsingh chaudhary <
> chaudharymanishsin...@gmail.com> wrote:
>
>>
>> hi
>> to all,
>>
>> *sub- the following  giving an error statement like as under:-
>> *
>> num_nodes is set 8
>> *warning: Please use -channel as shown in tcl/ex/wireless-mitf.tcl
>> syntax error in expression "$i  $val(nn) ": extra tokens at end of
>> expression*
>>    *while executing*
>> *"for {set i 0} {$i  $val(nn) } {incr i} {
>>        set node_($i) [$ns_ node]
>>        $node_($i) random-motion 0        ;# disable random motion
>>    }"
>>
>>
>> please sort out above error.**warning: Please use -channel as shown in
>> tcl/ex/wireless-mitf.tcl
>> syntax error in expression "$i  $val(nn) ": extra tokens at end of
>> expression*
>>    *while executing*
>> *
>>
>> with regards
>> manish
>> *
>>
>
>

Reply via email to