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

	<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>2004-02-05T13:30:27-04:00</updated>

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

		<entry>
		<author><name><![CDATA[Ofloo]]></name></author>
		<updated>2004-02-05T13:30:27-04:00</updated>

		<published>2004-02-05T13:30:27-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=33256#p33256</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=33256#p33256"/>
		<title type="html"><![CDATA[catch question/error ??]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=33256#p33256"><![CDATA[
sorry ic what u mean .. lol think i understand now tnx<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=3151">Ofloo</a> — Thu Feb 05, 2004 1:30 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[stdragon]]></name></author>
		<updated>2004-02-05T13:29:08-04:00</updated>

		<published>2004-02-05T13:29:08-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=33255#p33255</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=33255#p33255"/>
		<title type="html"><![CDATA[catch question/error ??]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=33255#p33255"><![CDATA[
"expr" is a command, not a variable...<br><br>as for your second question, use the code that I showed you already :)<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=8">stdragon</a> — Thu Feb 05, 2004 1:29 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Ofloo]]></name></author>
		<updated>2004-02-05T13:26:02-04:00</updated>

		<published>2004-02-05T13:26:02-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=33253#p33253</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=33253#p33253"/>
		<title type="html"><![CDATA[catch question/error ??]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=33253#p33253"><![CDATA[
but why.. how can a variable be executed ?<br><br>so how can i prevent it from executing i just wana set something and catch it in case it goes wrong ..<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=3151">Ofloo</a> — Thu Feb 05, 2004 1:26 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[stdragon]]></name></author>
		<updated>2004-02-05T13:23:21-04:00</updated>

		<published>2004-02-05T13:23:21-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=33252#p33252</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=33252#p33252"/>
		<title type="html"><![CDATA[catch question/error ??]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=33252#p33252"><![CDATA[
Because catch executes the code you pass it... if you are calling<br><br>catch [expr 1+2] blah<br><br>Then tcl first does substitution...<br><br>catch 3 blah<br><br>Then tcl tries to execute "3", and gets an error. You probably meant:<br><br>catch {expr 1+2} blah<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=8">stdragon</a> — Thu Feb 05, 2004 1:23 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Ofloo]]></name></author>
		<updated>2004-02-05T13:25:09-04:00</updated>

		<published>2004-02-05T13:12:01-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=33250#p33250</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=33250#p33250"/>
		<title type="html"><![CDATA[catch question/error ??]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=33250#p33250"><![CDATA[
<div class="codebox"><p>Code: </p><pre><code>if {[string match -nocase *k* $packet(size)]} {  catch {[format %.2f [expr [lindex [split [string tolower $packet(size)] k] 0] * 1024.0]]} packet(byte)} elseif {[string match -nocase *m* $packet(size)]} {  catch {[format %.2f [expr [lindex [split [string tolower $packet(size)] m] 0] * 1024 * 1024.0]]} packet(byte)} elseif {[string match -nocase *g* $packet(size)]} {  catch {[format %.2f [expr [lindex [split [string tolower $packet(size)] g] 0] * 1024 * 1024 * 1024.0]]} packet(byte)} elseif {[string match -nocase *b* $packet(size)]} {  catch {[format %.2f [lindex [split [string tolower $packet(size)] b] 0]]} packet(byte)}putlog "$packet(byte)"</code></pre></div><blockquote class="uncited"><div>error: [18:06] &lt;Eggy&gt; [18:06] invalid command name "5368709120.00"</div></blockquote><blockquote class="uncited"><div>catch script ?varName?</div></blockquote>so the last one is setting the varname right ..? ex: catch [expr 1+2] result<br>putlog $result -- &gt; result = 3 right ??<br><br>why then is it giving that error ?<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=3151">Ofloo</a> — Thu Feb 05, 2004 1:12 pm</p><hr />
]]></content>
	</entry>
	</feed>
