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

	<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-01-15T15:25:00-04:00</updated>

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

		<entry>
		<author><name><![CDATA[stdragon]]></name></author>
		<updated>2002-01-15T15:25:00-04:00</updated>

		<published>2002-01-15T15:25:00-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=3834#p3834</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=3834#p3834"/>
		<title type="html"><![CDATA[using arrays to make code work when bot is on many channels]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=3834#p3834"><![CDATA[
[oops double post]<br><br>&lt;font size=-1&gt;[ This Message was edited by: stdragon on 2002-01-15 12:25 ]&lt;/font&gt;<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=8">stdragon</a> — Tue Jan 15, 2002 3:25 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[stdragon]]></name></author>
		<updated>2002-01-15T15:25:00-04:00</updated>

		<published>2002-01-15T15:25:00-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=3833#p3833</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=3833#p3833"/>
		<title type="html"><![CDATA[using arrays to make code work when bot is on many channels]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=3833#p3833"><![CDATA[
You must have already set the variable somewhere else (perhaps initialization). Once you set a variable, it can no longer be an array. Just get rid of that part and it should work.<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=8">stdragon</a> — Tue Jan 15, 2002 3:25 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[z_one]]></name></author>
		<updated>2002-01-15T12:05:00-04:00</updated>

		<published>2002-01-15T12:05:00-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=3830#p3830</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=3830#p3830"/>
		<title type="html"><![CDATA[using arrays to make code work when bot is on many channels]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=3830#p3830"><![CDATA[
Perhaps I should rephrase to help u guys see what I mean <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_smile.gif" width="15" height="15" alt=":smile:" title="Smile"><br>I read an article that specifies that the global command converts entire arrays, not just individual strings:<br><a href="http://www.suninet.nl/tclguide/tclguide-ch5.html#ch5.5" class="postlink">http://www.suninet.nl/tclguide/tclguide-ch5.html#ch5.5</a><br><br>-----<br><br>Why then when I initialize as follows:<br><br>proc betaz {nick uhost hand chan} {<br>  global ipjoinlast<br>  if (![info exists ipjoinlast($chan)]) { <br>    set ipjoinlast($chan) ""<br>  }<br>  ...<br>}<br><br>I get the following error:<br><br>TCL error [betaz]: can't set "ipjoinlast(#mychannel)": variable isn't array<br><br>&lt;font size=-1&gt;[ This Message was edited by: z_one on 2002-01-15 09:06 ]&lt;/font&gt;<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=698">z_one</a> — Tue Jan 15, 2002 12:05 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[z_one]]></name></author>
		<updated>2002-01-15T11:14:00-04:00</updated>

		<published>2002-01-15T11:14:00-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=3819#p3819</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=3819#p3819"/>
		<title type="html"><![CDATA[using arrays to make code work when bot is on many channels]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=3819#p3819"><![CDATA[
I'm sorry I typed the following line wrong:<br><br>set ipjoinbmask *!*[string tolower [string range $uhost [string first "@" $uhost] end]] <br><br>actually I used this in my code (using and array to make the variable channel specific too)<br><br>set ipjoinbmask($chan) *!*[string tolower [string range $uhost [string first "@" $uhost] end]] <br><br>-----<br><br>Which variable am I setting twice ?<br>I have:<br><br>set ipjoinbmask($chan)<br><br>set ipjoinlast($chan)<br><br>They are two different variables.<br>I'm sorry I didn't get ur last point, if there's anything I missed pls feel free to explain <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_smile.gif" width="15" height="15" alt=":smile:" title="Smile"><br><br>Thanks in advance<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=698">z_one</a> — Tue Jan 15, 2002 11:14 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[ppslim]]></name></author>
		<updated>2002-01-15T11:06:00-04:00</updated>

		<published>2002-01-15T11:06:00-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=3818#p3818</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=3818#p3818"/>
		<title type="html"><![CDATA[using arrays to make code work when bot is on many channels]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=3818#p3818"><![CDATA[
<blockquote class="uncited"><div>bind join - * betaz<br>proc betaz {nick uhost hand chan} {<br>  global ipjoinlast<br><br>  set ipjoinbmask($chan) *!*[string tolower [string range $uhost [string first "@" $uhost] end]]<br>}</div></blockquote>Note that you where using 2 set commands on the same var name, but of 2 different types, which is the reason for the error.<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=2">ppslim</a> — Tue Jan 15, 2002 11:06 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[z_one]]></name></author>
		<updated>2002-01-15T07:06:00-04:00</updated>

		<published>2002-01-15T07:06:00-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=3817#p3817</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=3817#p3817"/>
		<title type="html"><![CDATA[using arrays to make code work when bot is on many channels]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=3817#p3817"><![CDATA[
I have the following code:<br><br>bind join - * betaz<br>proc betaz {nick uhost hand chan} {<br>  global ipjoinlast<br><br>  set ipjoinbmask *!*[string tolower [string range $uhost [string first "@" $uhost] end]]<br><br>  if {$ipjoinlast($chan) != ""} {<br>    set ipjoinlast($chan) "0.0.0.0"<br>  }<br>  ...<br><br>and when I run it on channel #mychan I get the following error msg, why ?<br><br>TCL error [betaz]: can't set "ipjoinlast(#mychan)": variable isn't array<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=698">z_one</a> — Tue Jan 15, 2002 7:06 am</p><hr />
]]></content>
	</entry>
	</feed>
