<?xml version="1.0" encoding="UTF-8"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en-gb">
	<link rel="self" type="application/atom+xml" href="https://forum.eggheads.org/app.php/feed/topic/6292" />

	<title>egghelp/eggheads community</title>
	<subtitle>Discussion of eggdrop bots, shell accounts and tcl scripts.</subtitle>
	<link href="https://forum.eggheads.org/index.php" />
	<updated>2003-12-04T11:19:46-04:00</updated>

	<author><name><![CDATA[egghelp/eggheads community]]></name></author>
	<id>https://forum.eggheads.org/app.php/feed/topic/6292</id>

		<entry>
		<author><name><![CDATA[Ofloo]]></name></author>
		<updated>2003-12-04T11:19:46-04:00</updated>

		<published>2003-12-04T11:19:46-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=31062#p31062</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=31062#p31062"/>
		<title type="html"><![CDATA[Multiuser global variables]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=31062#p31062"><![CDATA[
never would of tought on using it like that but it works tnx man u been real help.<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=3151">Ofloo</a> — Thu Dec 04, 2003 11:19 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[user]]></name></author>
		<updated>2003-12-04T03:38:54-04:00</updated>

		<published>2003-12-04T03:38:54-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=31056#p31056</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=31056#p31056"/>
		<title type="html"><![CDATA[Multiuser global variables]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=31056#p31056"><![CDATA[
<blockquote class="uncited"><div>info exists $varname<br>returns: No sutch variable "$varname"</div></blockquote>It does not <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_smile.gif" width="15" height="15" alt=":)" title="Smile"> This is the error: can't read "varname": no such variable - notice: no '$'<br>That error is from the variable substitution taking place BEFORE the arguments are passed to "info". '$' is only used when you want the value of a variable in tcl (you should know this by now), so the correct syntax would be 'info exists varname'. (unless the name of the variable you want to check for is stored in 'varname' of course <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_razz.gif" width="15" height="15" alt=":P" title="Razz">)<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=2878">user</a> — Thu Dec 04, 2003 3:38 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Ofloo]]></name></author>
		<updated>2003-12-03T23:54:42-04:00</updated>

		<published>2003-12-03T23:54:42-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=31052#p31052</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=31052#p31052"/>
		<title type="html"><![CDATA[Multiuser global variables]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=31052#p31052"><![CDATA[
Sorry for late answer wasn't able to dcc chat so wasn't able to work with the bot either but this is the result for <br><br>info exists $varname<br><div class="codebox"><p>Code: </p><pre><code>proc procname {..} {  if {[info exists $varname]} {    ......  }  ......}</code></pre></div>returns: No sutch variable "$varname" so its not realy what i was looking for .. <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_sad.gif" width="15" height="15" alt=":(" title="Sad"> but tnx for trying .. <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_smile.gif" width="15" height="15" alt=":)" title="Smile"> or am i doing something wrong also could be the case<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=3151">Ofloo</a> — Wed Dec 03, 2003 11:54 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Ofloo]]></name></author>
		<updated>2003-12-03T13:39:29-04:00</updated>

		<published>2003-12-03T13:39:29-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=31036#p31036</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=31036#p31036"/>
		<title type="html"><![CDATA[Multiuser global variables]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=31036#p31036"><![CDATA[
right lol sorry its been a while and i use loads of samples from scripts to get the syntax <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_wink.gif" width="15" height="15" alt=";)" title="Wink"> and they used error a lot so i assumed it was error instead of catch ..<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=3151">Ofloo</a> — Wed Dec 03, 2003 1:39 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[user]]></name></author>
		<updated>2003-12-03T12:32:38-04:00</updated>

		<published>2003-12-03T12:32:38-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=31033#p31033</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=31033#p31033"/>
		<title type="html"><![CDATA[Multiuser global variables]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=31033#p31033"><![CDATA[
Check out <a href="http://tcl.tk/man/tcl8.3/TclCmd/info.htm#M11" class="postlink">info exists</a>. And I think you mean <a href="http://tcl.tk/man/tcl8.3/TclCmd/catch.htm" class="postlink">catch</a> when you say "error" <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_smile.gif" width="15" height="15" alt=":)" title="Smile"> (catch can be used to avoid stopping execution if an error occurs)<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=2878">user</a> — Wed Dec 03, 2003 12:32 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Ofloo]]></name></author>
		<updated>2003-12-03T10:28:07-04:00</updated>

		<published>2003-12-03T10:28:07-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=31026#p31026</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=31026#p31026"/>
		<title type="html"><![CDATA[Multiuser global variables]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=31026#p31026"><![CDATA[
could u give me small example ?? cause ... if u use id<br><br><br>like for example nick<br><br>set var($idx) c:\\<br><br>an example only can be used<br><br><br>example script like control:listen<br><div class="codebox"><p>Code: </p><pre><code>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  }}</code></pre></div>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 .. <br><br>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 ..<br><br>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 ..?<br><br>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 ...<br><br>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 ..<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=3151">Ofloo</a> — Wed Dec 03, 2003 10:28 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[user]]></name></author>
		<updated>2003-12-02T20:40:26-04:00</updated>

		<published>2003-12-02T20:40:26-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=31008#p31008</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=31008#p31008"/>
		<title type="html"><![CDATA[Multiuser global variables]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=31008#p31008"><![CDATA[
Use an array with element names that is unique for each session (eg. the idx of a partyline user or some counter you increment each time you start a new session): <div class="codebox"><p>Code: </p><pre><code>set blah($id) something</code></pre></div><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=2878">user</a> — Tue Dec 02, 2003 8:40 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Ofloo]]></name></author>
		<updated>2003-12-02T20:21:22-04:00</updated>

		<published>2003-12-02T20:21:22-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=31007#p31007</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=31007#p31007"/>
		<title type="html"><![CDATA[Multiuser global variables]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=31007#p31007"><![CDATA[
My question:<br><br>i use a proc all the time over and over and over this proc uses global variables witch are unpossible to set within the proc like path and if i use cd the path is appended .. like set path c:\\<br>...........<br>cd test &gt;&gt; set path c:\\test\\<br><br>now my question if i where to make a multi user session like 2 users using the same proc at the same time .. for example in dcc sesions how would i be able to make the new user enter the home path and if the second user would brouse the files how would that work for the first user so my question<br><br><br>u set a variable<br><br>set test 1<br><br><br>within the proc u set the variable again .. by appending data or adding a value like expression<br>proc ...<br>global test<br><br>set test [expr $test + 1]<br><br><br>.. second users uses the path as well .. <br>now he is gone use global as well but the value of the number is not 1 any more cause the previous user has reset it .. to 2 so my question<br> <br>how do i use global variables with in a multiuser envirement ..? <br><br>Not sur if i am making my self clear so .. plz do ask if there is something that isn't clear to u<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=3151">Ofloo</a> — Tue Dec 02, 2003 8:21 pm</p><hr />
]]></content>
	</entry>
	</feed>
