seems you are trying to append/prepend array entries to a non-array variable. I dont recognize this syntax: set user($user_name) I'm no TCL wizkid but if that doesn't mean anythng you have your bug
you probably initialized the var like 'set user ""' or something like that, but you musn't. you can use 'set user() ""', but however it redudant. each element needs to be initialized to not cause an error, so you need to check 'info exists user(element)' anyway, if you want to read and not sure about the existens.
mmmm, nope. That little piece of code isnt in a proc. Its like an on startup event. Its not working though 'dalton' is in my database as a name. Its saying cant set user(dalton): variable isnt array.
As this is an on start event it is the first time I Set the variable.
Maybe it's an argument to your proc? What De Kus said is really the only way this error could be happening.. you already have a variable called user and it's not an array.
you are missing a close bracet at the end of the proc, and your switch expression will most like cause this:
tcl: evaluate (.tcl): switch -- hello {case "hello" {return 2}}
Tcl error: extra switch pattern with no body