user1276891
user1276891

Reputation: 69

I am having difficulties run Tcl script

I have started learning TCL scripting language. I use ActivateState Tcl Devkit 5.3.0. When I create new simulator it gives mistake like this:

invalid command name "new"
    while executing
"new Simulator"
    invoked from within
"set ns [new Simulator]"

Upvotes: 4

Views: 3617

Answers (3)

Jeremiah Handcock
Jeremiah Handcock

Reputation: 11

Try this line below, assuming you are using ns

ns filename.tcl 

Upvotes: 1

CharybdeBE
CharybdeBE

Reputation: 1843

If you are using ns (i've got the exactly the same error some hours ago so i guess yes ^^ ) you can try this command :

ns your_tcl_script.tcl

And if ns is correctly installed it will make the linkage for you

Have a nice day

Upvotes: 2

schlenk
schlenk

Reputation: 7247

There is no command newin Tcl.

So it is provided by some package or by some modified shell.

Assuming you use ns2 or something like that, you need to use the appropriate shell or load the package via package require into a normal tclsh shell.

Upvotes: 1

Related Questions