could u give me small example ?? cause ... if u use id
like for example nick
set var($idx) c:\\
an example only can be used
example script like control:listen
Code: Select all
set var c:\\
proc test {idx arg} {
global var
if {....}{
# also i can't set the new variable cause that would reset it each time i used it
putdcc $idx "$var($idx)
}
if {....}{
set var($idx) $var($idx)$arg
}
}
simple example how would i solve this ..? cause control goes true the proc each time data comes up on the socket same as connect .. suppose u open second socket and second user where to use the global var ..
and i can't see any variable that checks if a variable is set execpt vwait but if it wouldn't set it would have to wait for ever ... and it has to happen in the proc cause once i do it outside the proc its a global variable again ..
so my problem is how do i set a varable when its not set yet and only when its not set .. or is there a command that checks if a variable is valid .. like valididx ..?
cause then i would be able to set the variable in an if string if its not set and when its is set it doesn't requere setting so ...
maybe i can use error or something cause if u trigger an unset variable an error occures but the thing is i do not understand error that well .. so if u could give me some pointers .. on that ?? like example string ??? and some info about that ..