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

	<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>2006-06-27T03:35:27-04:00</updated>

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

		<entry>
		<author><name><![CDATA[De Kus]]></name></author>
		<updated>2006-06-27T03:35:27-04:00</updated>

		<published>2006-06-27T03:35:27-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=64344#p64344</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=64344#p64344"/>
		<title type="html"><![CDATA[Problem with decreasing a variable]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=64344#p64344"><![CDATA[
its equivalent with 'incr i -[lindex $line 0]', however only the expr one will work on negative values.<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=2382">De Kus</a> — Tue Jun 27, 2006 3:35 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[phab]]></name></author>
		<updated>2006-06-26T17:59:46-04:00</updated>

		<published>2006-06-26T17:59:46-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=64333#p64333</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=64333#p64333"/>
		<title type="html"><![CDATA[Problem with decreasing a variable]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=64333#p64333"><![CDATA[
Doenst <div class="codebox"><p>Code: </p><pre><code>set i [expr {$i - [lindex $line 0]}]</code></pre></div> work?<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=6630">phab</a> — Mon Jun 26, 2006 5:59 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[DragnLord]]></name></author>
		<updated>2006-06-25T09:43:36-04:00</updated>

		<published>2006-06-25T09:43:36-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=64308#p64308</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=64308#p64308"/>
		<title type="html"><![CDATA[Problem with decreasing a variable]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=64308#p64308"><![CDATA[
if <div class="codebox"><p>Code: </p><pre><code>[lindex $line 0]</code></pre></div> is "2"<div class="codebox"><p>Code: </p><pre><code>incr i -[lindex $line 0]</code></pre></div>means that it is increased by -2, which means it is decreased by 2<br>obviously you didn't bother to try it[/code]<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=4461">DragnLord</a> — Sun Jun 25, 2006 9:43 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[darton]]></name></author>
		<updated>2006-06-25T09:09:07-04:00</updated>

		<published>2006-06-25T09:09:07-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=64307#p64307</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=64307#p64307"/>
		<title type="html"><![CDATA[Problem with decreasing a variable]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=64307#p64307"><![CDATA[
Yes, it works Sir_Fz. But if i is 3 and it should be decreased the result is 2. With your script it is not 2, but -2. With "trimleft" I can make the variable i positive again, but maybe this is too circumstantial and there is an easier way.<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=7270">darton</a> — Sun Jun 25, 2006 9:09 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Sir_Fz]]></name></author>
		<updated>2006-06-25T07:40:25-04:00</updated>

		<published>2006-06-25T07:40:25-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=64306#p64306</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=64306#p64306"/>
		<title type="html"><![CDATA[Problem with decreasing a variable]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=64306#p64306"><![CDATA[
<div class="codebox"><p>Code: </p><pre><code>incr i -[lindex $line 0]</code></pre></div>this will decrement <strong class="text-strong">i</strong> by '[lindex $line 0]' instead of increment.<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=3085">Sir_Fz</a> — Sun Jun 25, 2006 7:40 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[darton]]></name></author>
		<updated>2006-06-25T06:15:29-04:00</updated>

		<published>2006-06-25T06:15:29-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=64305#p64305</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=64305#p64305"/>
		<title type="html"><![CDATA[Problem with decreasing a variable]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=64305#p64305"><![CDATA[
With the '[lindex $line 0]' it is defined what should be increased. So none of your scripts work.<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=7270">darton</a> — Sun Jun 25, 2006 6:15 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[DragnLord]]></name></author>
		<updated>2006-06-24T23:15:40-04:00</updated>

		<published>2006-06-24T23:15:40-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=64303#p64303</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=64303#p64303"/>
		<title type="html"><![CDATA[Problem with decreasing a variable]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=64303#p64303"><![CDATA[
simply:<div class="codebox"><p>Code: </p><pre><code>incr i -1</code></pre></div>in the script you have '[lindex $line 0]' is used to obtain the increment value<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=4461">DragnLord</a> — Sat Jun 24, 2006 11:15 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Garp]]></name></author>
		<updated>2006-06-24T21:17:19-04:00</updated>

		<published>2006-06-24T21:17:19-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=64302#p64302</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=64302#p64302"/>
		<title type="html"><![CDATA[Re: Problem with decreasing a variable]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=64302#p64302"><![CDATA[
<blockquote class="uncited"><div><div class="codebox"><p>Code: </p><pre><code>incr i [lindex $line 0] -1</code></pre></div></div></blockquote>you do something like "1 +1 -1" but incr allows only one operation like "1+1" or "1-1"<br><br> (($i + $y) - $z) it would be something like<br><div class="codebox"><p>Code: </p><pre><code>set i [expr [incr i [lindex $line 0]] -1]</code></pre></div><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=3849">Garp</a> — Sat Jun 24, 2006 9:17 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[darton]]></name></author>
		<updated>2006-06-24T17:45:37-04:00</updated>

		<published>2006-06-24T17:45:37-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=64301#p64301</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=64301#p64301"/>
		<title type="html"><![CDATA[Problem with decreasing a variable]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=64301#p64301"><![CDATA[
Hello!<br>In one of my scripts there is this line:<div class="codebox"><p>Code: </p><pre><code>incr i [lindex $line 0]</code></pre></div>But now I don't want to increase it but I want to decrease it. So I changed it to this:<div class="codebox"><p>Code: </p><pre><code>incr i [lindex $line 0] -1</code></pre></div>It does not work. The error is: Tcl error [flag]: wrong # args: should be "incr varName ?increment?"<br>What's wrong?<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=7270">darton</a> — Sat Jun 24, 2006 5:45 pm</p><hr />
]]></content>
	</entry>
	</feed>
