Hi Learner,
The error is due to the following line eval $node addr $args Class Node does not have instproc "addr". Therefore the Tcl spit out the error. To fix it, define instproc addr for the class of $node If you would like to learn how to read OTcl error message, please read http://www.ns2ultimate.com/post/419191200/tcl-error-message-in-ns2 Best Regards, Teerawat Issariyakul http://www.ns2ultimate.com/ http://www.facebook.com/pages/Teerawat-Issariyakul/358240861417 http://twitter.com/T_Bear http://www.t-issariyakul.blogspot.com http://www.ece.ubc.ca/~teerawat On 4/13/2010, "The Learner" <[email protected]> wrote: > > >When I run my tcl script, I get the following error- > >(_o14 cmd line 1) > invoked from within >"_o14 cmd addr" > invoked from within >"catch "$self cmd $args" ret" > invoked from within >"if [catch "$self cmd $args" ret] { >set cls [$self info class] >global errorInfo >set savedInfo $errorInfo >error "error when calling class $cls: $args" $..." > (procedure "_o14" line 2) > (SplitObject unknown line 2) > invoked from within >"_o14 addr" > ("eval" body line 1) > invoked from within >"eval $node addr $args" > ("default" arm line 2) > invoked from within >"switch -exact $routingAgent_ { > >MSClusterHead { >set ragent [$self create-msprotoch-agent $node] >} >MSDataDiscovery { >set ragent [$self create-msprotodd..." > (procedure "_o3" line 14) > (Simulator create-wireless-node line 14) > invoked from within >"_o3 create-wireless-node" > ("eval" body line 1) > invoked from within >"eval $self create-wireless-node $args" > (procedure "_o3" line 23) > (Simulator node line 23) > invoked from within >"$ns node" > ("for" body line 2) > invoked from within >"for {set i 0} {$i < $val(nn) } {incr i} { > set node_($i) [$ns node] > $node_($i) random-motion 0 ;# disable random motion > }" > (file "simulation.tcl" line 60) > >What does this error mean? And how can I rectify this? > >Thanks and Regards, >The Learner >-- >View this message in context: >http://old.nabble.com/Error-while-running-the-tcl-script-while-implementing-a-new-protocol-in-ns2-tp28219216p28219216.html >Sent from the ns-users mailing list archive at Nabble.com. >
