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

	<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>2018-08-10T10:44:28-04:00</updated>

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

		<entry>
		<author><name><![CDATA[SpiKe^^]]></name></author>
		<updated>2018-08-10T10:44:28-04:00</updated>

		<published>2018-08-10T10:44:28-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=106977#p106977</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=106977#p106977"/>
		<title type="html"><![CDATA[Money.tcl]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=106977#p106977"><![CDATA[
This line of code is where we get that error<div class="codebox"><p>Code: </p><pre><code>money chan nick hand</code></pre></div>I am not sure exactly what you are going for here, but you will want to pass the variable values to the next process, Not the variable names...<div class="codebox"><p>Code: </p><pre><code>money $chan $nick $hand</code></pre></div>And you are calling [money] with the wrong number of arguments.<br>The proc is wrote requiring 4 args, you are calling it with 3.<br><br>Please post the entire script here, or at least all binds/procs leading up to this process.  You have several other errors still to come:)<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=7749">SpiKe^^</a> — Fri Aug 10, 2018 10:44 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[l.kleijn]]></name></author>
		<updated>2018-08-10T09:53:27-04:00</updated>

		<published>2018-08-10T09:53:27-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=106975#p106975</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=106975#p106975"/>
		<title type="html"><![CDATA[Money.tcl]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=106975#p106975"><![CDATA[
This is the error i get &lt;IRCop-Bot&gt; [15:52:46] Tcl error [join:money]: wrong # args: should be "money nick chan arg"<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=12392">l.kleijn</a> — Fri Aug 10, 2018 9:53 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[l.kleijn]]></name></author>
		<updated>2018-08-10T09:03:26-04:00</updated>

		<published>2018-08-10T09:03:26-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=106974#p106974</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=106974#p106974"/>
		<title type="html"><![CDATA[Money.tcl]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=106974#p106974"><![CDATA[
I wrote a script but it won't work.<br>The intention is that after a join a file read.<br>and if the nick is not in the list there would deposit money to the file<br><div class="codebox"><p>Code: </p><pre><code>proc join:money {nick host 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     }     money chan nick hand  }}proc money {chan nick hand what} {     set line_to_add "$nick|500"     set fname "money.txt"     set fp [open $fname "a"]     puts $fp $line_to_add     close $fp     putserv "NOTICE $nick :Welkom op $chan, u heeft zojuist geld ontvangen"     putserv "NOTICE $nick :om bij mij uit te kunnen geven aan de bar."     return 0}</code></pre></div><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=12392">l.kleijn</a> — Fri Aug 10, 2018 9:03 am</p><hr />
]]></content>
	</entry>
	</feed>
