Syntax error calling TCL script from shell script

hello everyone
i am beginner on shell scripting .and i am working on my project work on ad hoc network
i wrote a batch (.sh) to do a looping and execute a tcl script i wrote before in each iteration ..but i got this problem "

syntax error near unexpected token `('
/home/marcoss/ns-allinone-2.34/ns-2.34/adrouting.tcl  line 6: `set val(seed)               [lindex $argv 2];

"

it can not accept my third input argument to my tcl script ( ${tarry[$i]}) !!!

this is my shell script :

#! /bin/sh
function rout () {
.
.
}

q=1

for (( i=0; i<$q; i++))
do
 tarry[$i]=$RANDOM
 echo ${tarry[$i]}
done

for (( i=0; i<$q; i++))
do
/home/marcoss/ns-allinone-2.34/ns-2.34/adrouting.tcl  10Mb  /home/marcoss/work ${tarry[$i]}  dsr > /dev/null
rout
done

for (( i=0; i<$q; i++))
do
/home/marcoss/ns-allinone-2.34/ns-2.34/adrouting.tcl  10Mb   /home/marcoss/work ${tarry[$i]} aodv > /dev/null
rout
done

for (( i=0; i<$q; i++))
/home/marcoss/ns-allinone-2.34/ns-2.34/adrouting.tcl  10Mb  /home/marcoss/work ${tarry[$i]}  dsdv > /dev/null
rout
done

(xMb , /home/marcoss/....., ${tarry[$i]} ,aodv) are my tcl input arguments

so do not know what is this error mean and what shall i do ..!!!???

kindly regards your efforts...

could you post your complete code?