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

	<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>2014-10-04T15:41:59-04:00</updated>

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

		<entry>
		<author><name><![CDATA[Fire-Fox]]></name></author>
		<updated>2014-10-04T15:41:59-04:00</updated>

		<published>2014-10-04T15:41:59-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=103239#p103239</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=103239#p103239"/>
		<title type="html"><![CDATA[$var]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=103239#p103239"><![CDATA[
<div class="codebox"><p>Code: </p><pre><code>{$minus == !1}</code></pre></div>is wrong the !<br><br>it should with == as in != ex<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=8230">Fire-Fox</a> — Sat Oct 04, 2014 3:41 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[dutch1918]]></name></author>
		<updated>2014-10-04T08:33:33-04:00</updated>

		<published>2014-10-04T08:33:33-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=103238#p103238</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=103238#p103238"/>
		<title type="html"><![CDATA[$var]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=103238#p103238"><![CDATA[
I get the following error back:<br><br>Tcl error [pub:test]: invalid character "]" in expression "...irst "+" $change] == 0]"<br><br>After further research I resolved it. Here is the correct syntex:<br><div class="codebox"><p>Code: </p><pre><code>set plus [string first "+" $change]set minus [string first "-" $change]if {$plus == !1} {         putserv "PRIVMSG $channel :\[\00312DJIA\017]\002 --&gt;\017 \00303$last $change\017 | $timestamp"        } elseif {$minus == !1} {putserv "PRIVMSG $channel :\[\00312DJIA\017]\002 --&gt; \017\00304$last $change\017 | $timestamp"        } else {putserv "PRIVMSG $channel :\[\00312DJIA\017]\002 --&gt; $last \017 | $timestamp"}}</code></pre></div><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=12417">dutch1918</a> — Sat Oct 04, 2014 8:33 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[caesar]]></name></author>
		<updated>2014-10-04T03:16:20-04:00</updated>

		<published>2014-10-04T03:16:20-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=103237#p103237</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=103237#p103237"/>
		<title type="html"><![CDATA[$var]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=103237#p103237"><![CDATA[
Hi,<br><br>you should use <em class="text-italics">string first</em> to get what you want:<div class="codebox"><p>Code: </p><pre><code>if {[string first "+" $var] == 0]} {putserv "PRIVMSG $channel :\[\00304DJIA\017]\00303 --&gt; $last $change\017 | $timestamp"} elseif {[string first "-" $var] == 0]} {putserv "PRIVMSG $channel :\[\00304DJIA\017]\00304 --&gt; $last $change\017 | $timestamp" }</code></pre></div><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=187">caesar</a> — Sat Oct 04, 2014 3:16 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[dutch1918]]></name></author>
		<updated>2014-10-03T19:17:23-04:00</updated>

		<published>2014-10-03T19:17:23-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=103236#p103236</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=103236#p103236"/>
		<title type="html"><![CDATA[$var]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=103236#p103236"><![CDATA[
I have a $var that has data +###.## or -###.##. What I want to do is "if the $var has +###.## then do something. This is what I have thus far but it doesn't work...<br><div class="codebox"><p>Code: </p><pre><code>if {[$change]!="+"} {        putserv "PRIVMSG $channel :\[\00304DJIA\017]\00303 --&gt; $last $change\017 | $timestamp"        } else {putserv "PRIVMSG $channel :\[\00304DJIA\017]\00304 --&gt; $last $change\017 | $timestamp"        }</code></pre></div><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=12417">dutch1918</a> — Fri Oct 03, 2014 7:17 pm</p><hr />
]]></content>
	</entry>
	</feed>
