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

	<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>2003-08-17T18:05:32-04:00</updated>

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

		<entry>
		<author><name><![CDATA[jimmyx]]></name></author>
		<updated>2003-08-17T18:05:32-04:00</updated>

		<published>2003-08-17T18:05:32-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=25177#p25177</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=25177#p25177"/>
		<title type="html"><![CDATA[Changing 1 string to 3 parts]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=25177#p25177"><![CDATA[
I got it. <br><br>Thanks for your help, guys.<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=3500">jimmyx</a> — Sun Aug 17, 2003 6:05 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[strikelight]]></name></author>
		<updated>2003-08-16T23:30:18-04:00</updated>

		<published>2003-08-16T23:30:18-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=25131#p25131</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=25131#p25131"/>
		<title type="html"><![CDATA[Changing 1 string to 3 parts]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=25131#p25131"><![CDATA[
<blockquote class="uncited"><div>I'm guessing its either a stupid noob mistake -- or I should start reading up the tcl documentation some more. But here's a snipplet of what I have: <br><div class="codebox"><p>Code: </p><pre><code>proc addstrings {nick uhost w1 w2 w3 text} {        global mainchan file        putserv "NOTICE $mainchan : $nick ( $uhost ) adding $text to $file"        set fs [open strings.txt w]        set w1 [lindex $text  0]        set w2 [lindex $text  1]        set w3 [lindex $text  2]         puts $fs "1. $w1 2. $w2 3. $w3"        close $fs        putserv "NOTICE $mainchan : $text added."        return 1}</code></pre></div>It won't write anything to strings.txt..<br><br>I have addstrings binded to a msg, could that be why its not working? what could i use other than $text? <br><br>I've just recently started messing around with tcl..so I don't really understand much.  <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_redface.gif" width="15" height="15" alt=":oops:" title="Embarassed"></div></blockquote> I'm guessing you see an error in the partyline saying something to the effect of: "proc addstrings called with not enough arguments"<br><br>Consult doc/tcl-commands.doc for the # of parameters a msg bound proc must have.<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=2005">strikelight</a> — Sat Aug 16, 2003 11:30 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Sir_Fz]]></name></author>
		<updated>2003-08-16T20:16:57-04:00</updated>

		<published>2003-08-16T20:16:57-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=25117#p25117</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=25117#p25117"/>
		<title type="html"><![CDATA[Changing 1 string to 3 parts]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=25117#p25117"><![CDATA[
try adding this : set text [split $text] (I think that the bot must split the text before using [lindex....])<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=3085">Sir_Fz</a> — Sat Aug 16, 2003 8:16 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[jimmyx]]></name></author>
		<updated>2003-08-16T19:33:19-04:00</updated>

		<published>2003-08-16T19:33:19-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=25112#p25112</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=25112#p25112"/>
		<title type="html"><![CDATA[Changing 1 string to 3 parts]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=25112#p25112"><![CDATA[
I'm guessing its either a stupid noob mistake -- or I should start reading up the tcl documentation some more. But here's a snipplet of what I have: <br><div class="codebox"><p>Code: </p><pre><code>proc addstrings {nick uhost w1 w2 w3 text} {        global mainchan file        putserv "NOTICE $mainchan : $nick ( $uhost ) adding $text to $file"        set fs [open strings.txt w]        set w1 [lindex $text  0]        set w2 [lindex $text  1]        set w3 [lindex $text  2]         puts $fs "1. $w1 2. $w2 3. $w3"        close $fs        putserv "NOTICE $mainchan : $text added."        return 1}</code></pre></div>It won't write anything to strings.txt..<br><br>I have addstrings binded to a msg, could that be why its not working? what could i use other than $text? <br><br>I've just recently started messing around with tcl..so I don't really understand much.  <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_redface.gif" width="15" height="15" alt=":oops:" title="Embarassed"><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=3500">jimmyx</a> — Sat Aug 16, 2003 7:33 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[caesar]]></name></author>
		<updated>2003-08-09T01:19:11-04:00</updated>

		<published>2003-08-09T01:19:11-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=24592#p24592</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=24592#p24592"/>
		<title type="html"><![CDATA[Changing 1 string to 3 parts]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=24592#p24592"><![CDATA[
How about this:<div class="codebox"><p>Code: </p><pre><code>set word1 [lindex $text 0]set word2 [lindex $text 1]set word3 [lindex $text 2]</code></pre></div><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=187">caesar</a> — Sat Aug 09, 2003 1:19 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[jimmyx]]></name></author>
		<updated>2003-08-08T17:41:01-04:00</updated>

		<published>2003-08-08T17:41:01-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=24585#p24585</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=24585#p24585"/>
		<title type="html"><![CDATA[Changing 1 string to 3 parts]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=24585#p24585"><![CDATA[
I was wondering it was possible to change 1 text string (for example: bob is cool) and make it into 3 seperate strings, bob, is, and cool. How would I go about doing this? I've used the search function, but I didn't find anything that could help, well..that I could understand.  <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_redface.gif" width="15" height="15" alt=":oops:" title="Embarassed"> <br><br>I guess that wasn't really that clear, so what im trying to do is having people message the bot with: !add bob is cool and having it put in the text file I set, but like this: <br><br>[word1]<br>bob<br><br>[word2]<br>is<br><br>[word3]<br>cool <br><br>Is it possible?  <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_redface.gif" width="15" height="15" alt=":oops:" title="Embarassed"><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=3500">jimmyx</a> — Fri Aug 08, 2003 5:41 pm</p><hr />
]]></content>
	</entry>
	</feed>
