[ns] Error in script of wireless simulation

2007-03-19 Thread super.ismiti

Hi all,

I'm trying to do a simulation wireless in ns-2.
The script of my simulation is together of this e-mail.
When I try to execute this script (ns scriptname.tcl), an error is showed:

num_nodes is set 2
Warning: Please use -channel as show in tcl/ex/wireless-mitf.tcl
INITIALIZE THE LIST xListHead
wrong # args: should be proc name args body
  while executing
proc stop{} {
   global ns_ tracefd
   $ns_ flush-trace
   close $tracefd
}
(file wireless1.tcl line 98)


Could somebody tell me what's wrong in my code. This code I got from a
tutorial in web:
http://www.isi.edu/nsnam/ns/tutorial/nsscript5.html

Thanks in advance,
Ricardo.


Re: [ns] Error in script of wireless simulation

2007-03-19 Thread maruf

Hi there,

Okay you should put a gap between stop and {}, you have written them together. 
The correct statement should be ' proc stop {} { '. Gaps are very important in 
NS scripting language.

maruf

- Original Message -
From: super.ismiti [EMAIL PROTECTED]
Date: Monday, March 19, 2007 1:06 pm
Subject: [ns] Error in script of wireless simulation
To: ns-users@ISI.EDU


  Hi all,
  
  I'm trying to do a simulation wireless in ns-2.
  The script of my simulation is together of this e-mail.
  When I try to execute this script (ns scriptname.tcl), an error is showed:
  
  num_nodes is set 2
  Warning: Please use -channel as show in tcl/ex/wireless-mitf.tcl
  INITIALIZE THE LIST xListHead
  wrong # args: should be proc name args body
while executing
  proc stop{} {
 global ns_ tracefd
 $ns_ flush-trace
 close $tracefd
  }
  (file wireless1.tcl line 98)
  
  
  Could somebody tell me what's wrong in my code. This code I got from 
 a
  tutorial in web:
  
  
  Thanks in advance,
  Ricardo.