- Home Page of ProjectGuideline.com ›
- Forums ›
- Get Help to do your B.E., and M.E., M.Tech., & M.S., Project in Ns2 ›
- Problem with God object!
Hi guys,
i have a problem in my script, i have this instruction in one of my procedure:
…
set connectivity_prob_sample [expr 1.0*[$god_ set num_connect]/$max_num_connections_]
…
and this is the error in the shell:
ns: connectivity_process_sample: can’t read “num_connect”: no such variable
while executing
“subst $[subst $var]”
(procedure “_o12” line 5)
(SplitObject set line 5)
invoked from within
“$god_ set num_connect”
(procedure “connectivity_process_sample” line 5)
invoked from within
“connectivity_process_sample”
I have create the god object before, but how can i use num_connect from god object???
I hope that num_connect is not a default parameter related with god object. So instead of using “$god_ set num_connect” , just use the total number of nodes or any number representing node count (like $val(nn) )in that calculation