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

	<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>2008-10-02T11:31:46-04:00</updated>

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

		<entry>
		<author><name><![CDATA[stafu]]></name></author>
		<updated>2008-10-02T11:31:46-04:00</updated>

		<published>2008-10-02T11:31:46-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=85379#p85379</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=85379#p85379"/>
		<title type="html"><![CDATA[TCL error: wrong # args error.]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=85379#p85379"><![CDATA[
Thanks guys. Taking out the chan arg fixed it. <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_smile.gif" width="15" height="15" alt=":)" title="Smile"><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=10243">stafu</a> — Thu Oct 02, 2008 11:31 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[nml375]]></name></author>
		<updated>2008-10-02T09:14:27-04:00</updated>

		<published>2008-10-02T09:14:27-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=85375#p85375</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=85375#p85375"/>
		<title type="html"><![CDATA[TCL error: wrong # args error.]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=85375#p85375"><![CDATA[
One suggestion, msg bindings do not provide a channel-argument, so remove that from your proc-head...<br>See the doc/tcl-commands.doc file that comes with your eggdrop for further details regarding different commands and bindings.<br><div class="codebox"><p>Code: </p><pre><code>proc spr:setweapon {nick host hand arg} {</code></pre></div><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=8052">nml375</a> — Thu Oct 02, 2008 9:14 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Furbs]]></name></author>
		<updated>2008-10-02T08:16:37-04:00</updated>

		<published>2008-10-02T08:16:37-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=85373#p85373</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=85373#p85373"/>
		<title type="html"><![CDATA[Re: TCL error: wrong # args error.]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=85373#p85373"><![CDATA[
try like<br><div class="codebox"><p>Code: </p><pre><code>proc spr:setweapon { nick host hand chan {arg ""} } {</code></pre></div><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=10242">Furbs</a> — Thu Oct 02, 2008 8:16 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[stafu]]></name></author>
		<updated>2008-10-02T04:49:50-04:00</updated>

		<published>2008-10-02T04:49:50-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=85371#p85371</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=85371#p85371"/>
		<title type="html"><![CDATA[TCL error: wrong # args error.]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=85371#p85371"><![CDATA[
Hey guys. I'm very new to TCL and I'm trying to make a scissors paper rock script. However when I message my choice to the bot it gets this error:<br><br>[16:42] Tcl error [spr:setweapon]: wrong # args: should be "spr:setweapon nick host handle chan arg"<br><br>Here are the bits of code that relate to the bit that's getting the error:<br><div class="codebox"><p>Code: </p><pre><code>bind msg - sprspr:setweaponproc spr:setweapon {nick host handle chan arg} {    global botnick spr_player1 spr_player2 spr_started spr_playerstat spr_player1_w spr_player2_w    if {$spr_started == 0} {        puthelp "PRIVMSG $chan :Game not running. Type !spr &lt;nick&gt; to play."        return 0    }if {$arg == ""} {puthelp "notice $nick :You need to /msg $botnick &lt;scissor, paper or rock&gt;"}if {$nick == $spr_player1} {if {$arg == "scissor"} {set spr_player1_w scissor}if {$arg == "paper"} {set spr_player1_w paper}if {$arg == "rock"} {set spr_player1_w rock}}if {$nick == $spr_player2} {if {$arg == "scissor"} {set spr_player2_w scissor}if {$arg == "paper"} {set spr_player2_w paper}if {$arg == "rock"} {set spr_player2_w rock}}spr:checkwin}</code></pre></div>I'm sure it's not the cleanest way to do what I'm trying to do, but at the moment I'm just testing/playing, but I can't work out why it's giving me that error. I've tried a bunch of different things and there's still always some problem.<br><br>Any ideas?<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=10243">stafu</a> — Thu Oct 02, 2008 4:49 am</p><hr />
]]></content>
	</entry>
	</feed>
