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

	<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>2009-04-16T15:47:07-04:00</updated>

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

		<entry>
		<author><name><![CDATA[nml375]]></name></author>
		<updated>2009-04-16T15:47:07-04:00</updated>

		<published>2009-04-16T15:47:07-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=88464#p88464</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=88464#p88464"/>
		<title type="html"><![CDATA[can't read &quot;chan&quot;: no such variable ?]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=88464#p88464"><![CDATA[
A word of advice for the future, avoid using "args" as an argument name. It'll "screw" things up for you if you are not aware of it's special properties.<br><br>If you'd like a more technical explanation how the timer/utimer command works, and why you should use the [list ...] approach, see <a href="http://forum.egghelp.org/viewtopic.php?t=16763" class="postlink">this thread</a><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=8052">nml375</a> — Thu Apr 16, 2009 3:47 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[boehmi]]></name></author>
		<updated>2009-04-13T20:01:29-04:00</updated>

		<published>2009-04-13T20:01:29-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=88426#p88426</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=88426#p88426"/>
		<title type="html"><![CDATA[can't read &quot;chan&quot;: no such variable ?]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=88426#p88426"><![CDATA[
<blockquote class="uncited"><div>in that case you must have a proc like this:<br><div class="codebox"><p>Code: </p><pre><code>proc give_answer { chan } {blah blah blah...}</code></pre></div>proc2 must take the chan argument as shown above. try it like that.</div></blockquote>yeah i did it like that... but the problem of my first post were the {} around the call.<br><br>However now it's working with [list ..]<br>Thank you very much<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=10592">boehmi</a> — Mon Apr 13, 2009 8:01 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Fill]]></name></author>
		<updated>2009-04-13T18:02:06-04:00</updated>

		<published>2009-04-13T18:02:06-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=88420#p88420</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=88420#p88420"/>
		<title type="html"><![CDATA[can't read &quot;chan&quot;: no such variable ?]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=88420#p88420"><![CDATA[
in that case you must have a proc like this:<br><div class="codebox"><p>Code: </p><pre><code>proc give_answer { chan } {blah blah blah...}</code></pre></div>proc2 must take the chan argument as shown above. try it like that.<br><br>or...<br><br>if you don't want proc2 to have any arguments (proc2 {} { blah }), you can make $chan a global variable on proc1:<br><div class="codebox"><p>Code: </p><pre><code>proc1 { blah blah } {global channelset channel $chanblah...}</code></pre></div>And then proc2 would be similar to this:<br><div class="codebox"><p>Code: </p><pre><code>proc2 {} { global channelblah}</code></pre></div><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=10430">Fill</a> — Mon Apr 13, 2009 6:02 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[arfer]]></name></author>
		<updated>2009-04-13T13:52:50-04:00</updated>

		<published>2009-04-13T13:52:50-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=88418#p88418</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=88418#p88418"/>
		<title type="html"><![CDATA[can't read &quot;chan&quot;: no such variable ?]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=88418#p88418"><![CDATA[
Either there is no proc called give_answer, or the proc give_answer doesn't take a single argument (in this case $chan).<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=5705">arfer</a> — Mon Apr 13, 2009 1:52 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[boehmi]]></name></author>
		<updated>2009-04-13T20:04:22-04:00</updated>

		<published>2009-04-13T13:20:18-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=88417#p88417</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=88417#p88417"/>
		<title type="html"><![CDATA[can't read &quot;chan&quot;: no such variable ?]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=88417#p88417"><![CDATA[
erm no... proc2 is not a part of proc1<br>proc1 is just called 1 line before <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_wink.gif" width="15" height="15" alt=";)" title="Wink"><br><br>its for a little quizbot<div class="codebox"><p>Code: </p><pre><code>proc quiz_start { nick uhost hand chan args } {        global quiz_status        set quiz_status "started"        sendmsg "PRIVMSG $chan :Quiz startet..."         putlog "test"         ask_question $chan         utimer 60 [list give_answer $chan]}</code></pre></div>if i use utimer 60 [list proc2 $chan] he just does nothing :/<br>not even errors<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=10592">boehmi</a> — Mon Apr 13, 2009 1:20 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Fill]]></name></author>
		<updated>2009-04-13T12:47:23-04:00</updated>

		<published>2009-04-13T12:47:23-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=88416#p88416</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=88416#p88416"/>
		<title type="html"><![CDATA[can't read &quot;chan&quot;: no such variable ?]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=88416#p88416"><![CDATA[
nope, that's totally wrong. First of all, you can't write this:<br><div class="codebox"><p>Code: </p><pre><code>utimer 60 { proc 2 $chan }</code></pre></div>Utimer commands are normally used inside brackets [], and if you want to execute a comand after 60 seconds (1 minute) you'll have to do something like this:<br><div class="codebox"><p>Code: </p><pre><code>utimer 60 [list proc2 $chan]</code></pre></div>If you get no such variable with $chan, it's because you didn't load that variable on proc1. When is proc1 called?<br><br>Show me the whole script so I can understand better how we're going to load up $chan.<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=10430">Fill</a> — Mon Apr 13, 2009 12:47 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[boehmi]]></name></author>
		<updated>2009-04-13T12:20:25-04:00</updated>

		<published>2009-04-13T12:20:25-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=88415#p88415</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=88415#p88415"/>
		<title type="html"><![CDATA[can't read &quot;chan&quot;: no such variable ?]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=88415#p88415"><![CDATA[
<div class="codebox"><p>Code: </p><pre><code>proc1 $chanutimer 60 { proc2 $chan }</code></pre></div>proc1 works correct... but the proc2-call within the {} throws the error can't read "chan": no such variable<br><br>Shouldn't $chan be valid inside a new {} block, just like in a do..while {} loop?<br><br>What is the problem?<br><br>Thanks for your help<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=10592">boehmi</a> — Mon Apr 13, 2009 12:20 pm</p><hr />
]]></content>
	</entry>
	</feed>
