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

	<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>2020-08-17T15:24:35-04:00</updated>

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

		<entry>
		<author><name><![CDATA[SpiKe^^]]></name></author>
		<updated>2020-08-17T15:24:35-04:00</updated>

		<published>2020-08-17T15:24:35-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=108882#p108882</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=108882#p108882"/>
		<title type="html"><![CDATA[Help with script]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=108882#p108882"><![CDATA[
Maybe check this forum thread for some procs to work with text files...<br><a href="http://forum.egghelp.org/viewtopic.php?t=19168" class="postlink">http://forum.egghelp.org/viewtopic.php?t=19168</a><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=7749">SpiKe^^</a> — Mon Aug 17, 2020 3:24 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[l.kleijn]]></name></author>
		<updated>2020-08-17T11:39:54-04:00</updated>

		<published>2020-08-17T11:39:54-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=108881#p108881</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=108881#p108881"/>
		<title type="html"><![CDATA[Help with script]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=108881#p108881"><![CDATA[
Now i have something else<br><br>I have a file called money.txt and there is a line called Fujin|50 and i want to remove that line with a tcl script. How do i do this ?<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=12392">l.kleijn</a> — Mon Aug 17, 2020 11:39 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[l.kleijn]]></name></author>
		<updated>2020-08-17T11:38:33-04:00</updated>

		<published>2020-08-17T11:38:33-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=108880#p108880</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=108880#p108880"/>
		<title type="html"><![CDATA[Help with script]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=108880#p108880"><![CDATA[
Now it's working thanks<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=12392">l.kleijn</a> — Mon Aug 17, 2020 11:38 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[CrazyCat]]></name></author>
		<updated>2020-08-17T09:19:53-04:00</updated>

		<published>2020-08-17T09:19:53-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=108879#p108879</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=108879#p108879"/>
		<title type="html"><![CDATA[Help with script]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=108879#p108879"><![CDATA[
In fact, you have a trouble with the following line:<div class="codebox"><p>Code: </p><pre><code>putserv "NOTICE $nick :You have €[lindex [split [join $searchresult] "|"] 1]"} {</code></pre></div>The right script might be:<div class="codebox"><p>Code: </p><pre><code>bind pub - !money pub:moneyproc pub:money {nick host hand chan arg} {global botnickset searchstring $argset fname "money.txt"set fp [open $fname "r"]set data [read -nonewline $fp]close $fpset lines [split $data "\n"]set searchresult ""foreach line $lines {if {[string match * $nick* [join $line]]} {lappend searchresult $line}if {[$nick == "[lindex [split [join $searchresult] "|"] 0]"} {putserv "NOTICE $nick :Je bent al een keer hier geweest."return 0}putserv "NOTICE $nick :You have €[lindex [split [join $searchresult] '|'] 1]"return 0}}</code></pre></div>Think to indent your code and you'll see this kind of errors<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=691">CrazyCat</a> — Mon Aug 17, 2020 9:19 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[l.kleijn]]></name></author>
		<updated>2020-08-17T08:39:03-04:00</updated>

		<published>2020-08-17T08:39:03-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=108878#p108878</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=108878#p108878"/>
		<title type="html"><![CDATA[Help with script]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=108878#p108878"><![CDATA[
<div class="codebox"><p>Code: </p><pre><code>bind pub - !money pub:money proc pub:money {nick host hand chan arg} {  global botnick  set searchstring $arg  set fname "money.txt"  set fp [open $fname "r"]  set data [read -nonewline $fp]  close $fp  set lines [split $data "\n"]  set searchresult ""  foreach line $lines {     if {[string match * $nick* [join $line]]} {        lappend searchresult $line     }     if {[$nick == "[lindex [split [join $searchresult] "|"] 0]"} {        putserv "NOTICE $nick :Je bent al een keer hier geweest."        return 0     }     putserv "NOTICE $nick :You have €[lindex [split [join $searchresult] "|"] 1]"} {     return 0  }}</code></pre></div>And i'm getting this error: [14:35:22] Tcl error [pub:money]: wrong # args: should be "foreach varList list ?varList list ...? command"<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=12392">l.kleijn</a> — Mon Aug 17, 2020 8:39 am</p><hr />
]]></content>
	</entry>
	</feed>
