for {set i 0} {$i < $num_nodes} {incr i} {
set a($i) [new Agent/MessagePassing/Flooding]
$n($i) attach $a($i) $MESSAGE_PORT
$a($i) set messages_seen {}
}
set Consumer n(0)
set Producer n(5)
$ns attach $a(1) $consumer
$ns attach $n(5) $producer
$ns connect $consumer $producer
where a comes from the agent node.Please tell me anyone why this gives error in agent a(0) in this line:
$ns attach $a(1) $consumer