LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - General (https://www.linuxquestions.org/questions/linux-general-1/)
-   -   error while executing a tcl file in ns2 (https://www.linuxquestions.org/questions/linux-general-1/error-while-executing-a-tcl-file-in-ns2-4175529116/)

Zahraa Ayad 12-23-2014 01:50 PM

error while executing a tcl file in ns2
 
1 Attachment(s)
Hi ...
i got this error while executing my tcl file

wrong # args: should be "_o3 self class proc node agent"
(Simulator attach-agent line 1)
invoked from within
"$ns attach-agent $node_(1) $tcp"
(file "third.tcl" line 96)

Can anyone help me to fix it?

knudfl 12-24-2014 05:41 AM

A simulation file.tcl can be run with the interpreter = 'ns'.

Your error(s) :
You may get an answer, if you attach the file.
I.e. there is no solution for "generic errors"/unknown file.

Please attach third.tcl as third.tcl.txt
Attachments : The paper clip tool in the 'Advanced Editor'.


-

knudfl 12-24-2014 09:50 AM

Code:

    96        $ns attach-agent $node_(1) $tcp  # source
    97        $ns attach-agent $node_(0) $sink  # destination
    98        $ns connect $tcp $sink

Please edit to :
Code:

$ns attach-agent $node_(1) $tcp  ;# source
$ns attach-agent $node_(0) $sink  ;# destination

I.e. the line must end with a semicolon ( ; ) if you want to add a #comment.

-

Zahraa Ayad 12-24-2014 10:20 AM

Thank u so much ...


All times are GMT -5. The time now is 07:43 AM.