新手学习NS2,添加mflood步骤与http://www.cnblogs.com/reaver21/archive/2012/02/09/2344056.html完全一样,但在运行mflood-3nodes.tcl时总是提示出错,求高手指导!
num_nodes is set 3 invalid command name "Agent/MFlood" while executing "Agent/MFlood create _o17 0" invoked from within "catch "$className create $o $args" msg" invoked from within "if [catch "$className create $o $args" msg] { if [string match "__FAILED_SHADOW_OBJECT_" $msg] { delete $o return "" } global errorInfo error "class $..." (procedure "new" line 3) invoked from within "new Agent/MFlood [$node id]" (procedure "_o3" line 2) (Simulator create-mflood-agent line 2) invoked from within "$self create-mflood-agent $node" ("MFlood" arm line 2) invoked from within "switch -exact $routingAgent_ { DSDV { set ragent [$self create-dsdv-agent $node] } DSR { $self at 0.0 "$node start-dsr" } AODV { set ragent [$self cre..." (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; }" (file "mflood-3nodes.tcl" line 61)