<?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/2808" />

	<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>2002-10-16T16:07:39-04:00</updated>

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

		<entry>
		<author><name><![CDATA[ppslim]]></name></author>
		<updated>2002-10-16T16:07:39-04:00</updated>

		<published>2002-10-16T16:07:39-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=12029#p12029</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=12029#p12029"/>
		<title type="html"><![CDATA[how would i know if a variable has been set or not ?]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=12029#p12029"><![CDATA[
OK, first thing. If the variable is being set by other commands, then you need to make sure, it is being set globaly (IE, so it can been seen, outside of this proc command).<br><br>SO, if you want to make $variable global, then you place "global variable" ont he line below the proc line.<br><br>second, yes, it will show an error if the variable has never been set.<br><br>One way around this, is to do "set variable {}" at the beginign of the script. This will creat an instance of the variable, so the error won't occur.<br><br>Other methods include using "[info exists variable]" to test if it exists.<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=2">ppslim</a> — Wed Oct 16, 2002 4:07 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Anonymous]]></name></author>
		<updated>2002-10-16T14:34:23-04:00</updated>

		<published>2002-10-16T14:34:23-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=12026#p12026</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=12026#p12026"/>
		<title type="html"><![CDATA[how would i know if a variable has been set or not ?]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=12026#p12026"><![CDATA[
im trying to check a variable if it has been set  or not -- <br><div class="codebox"><p>Code: </p><pre><code>proc myproc  { } {     if { $variable == "" } { commands ... }}</code></pre></div>the above code gives me an error saying NO SUCH VARIABLE, true because it not been set yet but in my other procedures it's being set and i dont want to process the above procedure if the $variable have been set or already exist. Also, that $variable is dynamic (it's created at runtime)<br><br>any help would be greatly appreciated.<p>Statistics: Posted by Guest — Wed Oct 16, 2002 2:34 pm</p><hr />
]]></content>
	</entry>
	</feed>
