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

	<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-29T11:18:57-04:00</updated>

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

		<entry>
		<author><name><![CDATA[darton]]></name></author>
		<updated>2006-06-29T11:18:57-04:00</updated>

		<published>2006-06-29T11:18:57-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=64437#p64437</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=64437#p64437"/>
		<title type="html"><![CDATA[Question about an array]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=64437#p64437"><![CDATA[
OK, thank you, it works for me too now.<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=7270">darton</a> — Thu Jun 29, 2006 11:18 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[spock]]></name></author>
		<updated>2006-06-29T11:03:04-04:00</updated>

		<published>2006-06-29T11:03:04-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=64436#p64436</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=64436#p64436"/>
		<title type="html"><![CDATA[Question about an array]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=64436#p64436"><![CDATA[
Yes, that does work, here.  <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_smile.gif" width="15" height="15" alt=":)" title="Smile"><br><br>edit: this works for me<div class="codebox"><p>Code: </p><pre><code>bind pubm - * reset:flagproc reset:flag {nick uhost hand chan arg} {  set reset [join [lrange [split $arg] 0 2]]# set reset [stripcodes bcruag $reset]  set case 0  set 3er_maps {    "C&amp;C_Under.mix"    "C&amp;C_Hourglass.mix"  }  foreach map3 $3er_maps {    if {[string match -nocase "Loading Level $map3" $reset]} {set case 1}  }  if {$case == 1} {   putquick "PRIVMSG $chan :..."  }}</code></pre></div><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=2369">spock</a> — Thu Jun 29, 2006 11:03 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[darton]]></name></author>
		<updated>2006-06-29T10:49:37-04:00</updated>

		<published>2006-06-29T10:49:37-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=64435#p64435</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=64435#p64435"/>
		<title type="html"><![CDATA[Question about an array]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=64435#p64435"><![CDATA[
No, that doesn't work, too.<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=7270">darton</a> — Thu Jun 29, 2006 10:49 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[spock]]></name></author>
		<updated>2006-06-29T10:29:37-04:00</updated>

		<published>2006-06-29T10:29:37-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=64434#p64434</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=64434#p64434"/>
		<title type="html"><![CDATA[Question about an array]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=64434#p64434"><![CDATA[
try<div class="codebox"><p>Code: </p><pre><code>if {[string match -nocase "Loading Level $map3" $reset]}</code></pre></div>and maybe <div class="codebox"><p>Code: </p><pre><code>set reset [join [lrange [split $arg] 0 2]]</code></pre></div><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=2369">spock</a> — Thu Jun 29, 2006 10:29 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[darton]]></name></author>
		<updated>2006-06-29T09:35:52-04:00</updated>

		<published>2006-06-29T09:35:52-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=64431#p64431</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=64431#p64431"/>
		<title type="html"><![CDATA[Question about an array]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=64431#p64431"><![CDATA[
Of course I closed the bracket, but forgot to post it here. I give you now my whole script so that you can see what is wrong.<div class="codebox"><p>Code: </p><pre><code>bind pubm - * reset:flagproc reset:flag {nick uhost hand chan arg} {  set reset [lrange [split $arg] 0 2]  set reset [stripcodes bcruag $reset]    set case 0  set 3er_maps {  "C&amp;C_Under.mix"  "C&amp;C_Hourglass.mix"  }  foreach map3 $3er_maps {  if {[string match -nocase {Loading Level $map3} $reset]} {set case 1}  }  if {$case == 1} {   putquick "PRIVMSG $chan :..."}</code></pre></div>If somebody in the channel writes "Loading level C&amp;C_Under.mix" the variable "case" should be set to 1, but that does not happen.<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=7270">darton</a> — Thu Jun 29, 2006 9:35 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Sir_Fz]]></name></author>
		<updated>2006-06-28T19:20:49-04:00</updated>

		<published>2006-06-28T19:20:49-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=64412#p64412</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=64412#p64412"/>
		<title type="html"><![CDATA[Question about an array]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=64412#p64412"><![CDATA[
<blockquote class="uncited"><div>set reset [lrange [split $arg] 0 2</div></blockquote>You need to close the bracket.<div class="codebox"><p>Code: </p><pre><code>set reset [lrange [split $arg] 0 2]</code></pre></div><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=3085">Sir_Fz</a> — Wed Jun 28, 2006 7:20 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[darton]]></name></author>
		<updated>2006-06-28T16:40:29-04:00</updated>

		<published>2006-06-28T16:40:29-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=64409#p64409</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=64409#p64409"/>
		<title type="html"><![CDATA[Question about an array]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=64409#p64409"><![CDATA[
No, it doesn't.<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=7270">darton</a> — Wed Jun 28, 2006 4:40 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[krimson]]></name></author>
		<updated>2006-06-28T16:27:16-04:00</updated>

		<published>2006-06-28T16:27:16-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=64408#p64408</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=64408#p64408"/>
		<title type="html"><![CDATA[Question about an array]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=64408#p64408"><![CDATA[
try using <div class="codebox"><p>Code: </p><pre><code>foreach text [split $texts \n] {  if {[string match -nocase $text $reset]} {set case 1} }</code></pre></div>it should work<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=7663">krimson</a> — Wed Jun 28, 2006 4:27 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[darton]]></name></author>
		<updated>2006-06-28T16:10:22-04:00</updated>

		<published>2006-06-28T16:10:22-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=64407#p64407</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=64407#p64407"/>
		<title type="html"><![CDATA[Question about an array]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=64407#p64407"><![CDATA[
Hello!<br>I have a question about an array. In one of my scripts I have this here:<div class="codebox"><p>Code: </p><pre><code>set reset [lrange [split $arg] 0 2]if {[string match -nocase {text 1} $reset] || [string match -nocase {text 2} $reset]} {set case 1}</code></pre></div>But now I want to replace the "text 1" and "text 2" with an array. So I made this:<div class="codebox"><p>Code: </p><pre><code>set case 0set reset [lrange [split $arg] 0 2set texts {"text 1""text 2""text 3""text 4"}set texts2 {"text 5""text 6" "text 7"}  foreach text $texts {  if {[string match -nocase $text $reset]} {set case 1}  }  foreach text2 $texts2 {  if {[string match -nocase $text2 $reset]} {set case 2}  }  </code></pre></div>But it don't set the variable "case" to 1 or 2. There must be something wrong with the foreach statements. Can anybody correct it for me?<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=7270">darton</a> — Wed Jun 28, 2006 4:10 pm</p><hr />
]]></content>
	</entry>
	</feed>
