[ns error] Parsing error in event.

Question: After I run a network simulation in nam(Network Animator) on the nam file generated by my tcl script, I get the following errors in my terminal:

Missing required flag -x in: W -t 500
Missing required flag -y in: W -t 500

Parsing error in event.

What could be wrong?

Answer: It isn’t a problem with the ns script.It is a problem associated with nam.It has turned out to be that if I use the slide-bar (TIME) to go to  a period of time instead of running the whole simulation time until it reaches the desired period of time NAM places (at least in my computer) the nodes in a wrong position that doesn’t match the reality. I’ve discovered it because when I slide the bar these messages appear in the console:

Missing required flag -x in: W -t 500
Missing required flag -y in: W -t 500
Parsing error in event.

So, the solution is clear: Let the simulation run until the desired time instead of using the slide-bar.

Was this post helpful? Then thank me by clicking <this link>