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

	<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>2002-09-09T05:58:17-04:00</updated>

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

		<entry>
		<author><name><![CDATA[ppslim]]></name></author>
		<updated>2002-09-09T05:58:17-04:00</updated>

		<published>2002-09-09T05:58:17-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=10684#p10684</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=10684#p10684"/>
		<title type="html"><![CDATA[trivia by souperman problem with my memory shell :(]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=10684#p10684"><![CDATA[
This is most likely, due to the fact, it reads the file on start-up.<br><br>Once the file is loaded, there is no reason for it to read the file again.<br><br>This is why you have the memory issues. Due to the fact, it has a large files contents in memory at all times.<br><br>Without a maor re-write, there is probably not much you can do (this is based on the way most scripts work).<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=2">ppslim</a> — Mon Sep 09, 2002 5:58 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Anonymous]]></name></author>
		<updated>2002-09-07T01:54:43-04:00</updated>

		<published>2002-09-07T01:54:43-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=10596#p10596</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=10596#p10596"/>
		<title type="html"><![CDATA[weird]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=10596#p10596"><![CDATA[
hmm....i try to use both of your suggest scripts code ppslim, the fisrt i use the second code, because it looks more flexible for future update if i have another userquestion more than 2, but...seems this code didnt work well, because my bot just read file question from question1 only and never read the question2 file.<br>what's wrong eh? hmm....i also confuss with this prob.  <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_confused.gif" width="15" height="15" alt=":-?" title="Confused">  <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_confused.gif" width="15" height="15" alt=":-?" title="Confused"><p>Statistics: Posted by Guest — Sat Sep 07, 2002 1:54 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Anonymous]]></name></author>
		<updated>2002-09-07T00:14:01-04:00</updated>

		<published>2002-09-07T00:14:01-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=10595#p10595</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=10595#p10595"/>
		<title type="html"><![CDATA[trivia by souperman problem with my memory shell :(]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=10595#p10595"><![CDATA[
ic....thx ppslim  <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_smile.gif" width="15" height="15" alt=":)" title="Smile"><p>Statistics: Posted by Guest — Sat Sep 07, 2002 12:14 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[ppslim]]></name></author>
		<updated>2002-09-06T08:24:34-04:00</updated>

		<published>2002-09-06T08:24:34-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=10568#p10568</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=10568#p10568"/>
		<title type="html"><![CDATA[trivia by souperman problem with my memory shell :(]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=10568#p10568"><![CDATA[
The reason is says no much cariable, is in reality, it doesn't.<br><div class="codebox"><p>Code: </p><pre><code>set a "hello"proc test {} {  set a "goodbye"}testputs stdout "$a"</code></pre></div>These are 2 different varaibles, because they are called at different levels of the script.<br><br>To change the value of a in the proc test, you need to tell the proc to use the variable a, defined as hello.<br><br>You do this, using the global command<br><br>IE<div class="codebox"><p>Code: </p><pre><code>set a "hello"proc test {} {  globak a  set a "goodbye"}testputs stdout "$a"</code></pre></div>Now the scriptw ould output "goodbye" rather than hello.<br><br>As such, you need to apply this to your scripts.<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=2">ppslim</a> — Fri Sep 06, 2002 8:24 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Anonymous]]></name></author>
		<updated>2002-09-06T07:50:57-04:00</updated>

		<published>2002-09-06T07:50:57-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=10563#p10563</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=10563#p10563"/>
		<title type="html"><![CDATA[hmm....??]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=10563#p10563"><![CDATA[
thanks for Oizoken who help me out from this trouble <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_smile.gif" width="15" height="15" alt=":)" title="Smile"><br><br>after i delete unneed bracket "}"  before }else{<br><br>this scripts can be loaded but..there's a new problem said :<br><br>test.tcl /usr/home/bla/scripts/file1 does not exist, failed to load. so the game is cannot be run<br><br>Actually this file has already exist but maybe my bot didnt know it because i set tgqdb "" <br><br>so...what should i do??<br><br>is there any way so my eggdrop can load that file?<br><br>do i should set tgqdb "" to "/usr/home/bla/scripts/file1" ?<br><br>and if i set tgqdb "" to "/usr/home/bla/scripts/file1"<br><br>then...it seems random script that i made didnt run, because it said message like this:<br><br>[04:31] Tcl error in script for 'timer591':<br>[04:31] can't read "tgqdb": no such variable<br><br> <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_cry.gif" width="15" height="15" alt=":cry:" title="Crying or Very sad">  <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_confused.gif" width="15" height="15" alt=":-?" title="Confused">  help me will ya?<p>Statistics: Posted by Guest — Fri Sep 06, 2002 7:50 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[ppslim]]></name></author>
		<updated>2002-09-06T07:10:00-04:00</updated>

		<published>2002-09-06T07:10:00-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=10561#p10561</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=10561#p10561"/>
		<title type="html"><![CDATA[trivia by souperman problem with my memory shell :(]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=10561#p10561"><![CDATA[
Use somthing like this.<br><div class="codebox"><p>Code: </p><pre><code>set tgqdb "/usr/home/bla/scripts/question1"set filerandomtimer 10proc randomqfile {} {  global filerandomtimer tgqdb  if {$tgqdb == "/usr/home/bla/scripts/question1"} {    set tgqdb "/usr/home/bla/scripts/question2"  } else {    set tgqdb "/usr/home/bla/scripts/question1"  }  timer $filerandomtimer randomqfile}timer $filerandomtimer randomqfile</code></pre></div>You could further split the files again, and use this instead. This one uses 5 files.<br><div class="codebox"><p>Code: </p><pre><code>set tgqdb "/usr/home/bla/scripts/question1"set filerandomtimer 10#Set this to the number of question files you haveset rannumfile 5proc randomqfile {} {  global filerandomtimer tgqdb rannumfile  set tgqdb "/usr/home/bla/scripts/question[expr [rand $rannumfile] + 1]"  timer $filerandomtimer randomqfile}timer $filerandomtimer randomqfile</code></pre></div>In this, you need to name your files.<br>/usr/home/bla/scripts/question1<br>/usr/home/bla/scripts/question2<br>/usr/home/bla/scripts/question3<br>/usr/home/bla/scripts/question4<br>/usr/home/bla/scripts/question5<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=2">ppslim</a> — Fri Sep 06, 2002 7:10 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Anonymous]]></name></author>
		<updated>2002-09-06T05:53:01-04:00</updated>

		<published>2002-09-06T05:53:01-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=10556#p10556</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=10556#p10556"/>
		<title type="html"><![CDATA[trivia by souperman problem with my memory shell :(]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=10556#p10556"><![CDATA[
hi... i use trivia by souperman and i like it very much, usually i ask my question in his forum but curently i cant reach his site (dont know why) and this is emergency problem for me. You know, that script use only one file for question but my shell have problem with memory ( i cant load a big file size) because it often get killed after a few questions showed, but it would not be happen if i decrease my userfile size, so...i try to write myself a modify at that part but it didnt work <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_sad.gif" width="15" height="15" alt=":(" title="Sad"><br>this bellow is scripts that i wrote/modify on trivia script in order to devide that userfile question into 2 part (2 files) that will be choose randomly every 10 minutes<br><br>first thing i set:<br>set tgqdb "/usr/bla/bla/bla/trivia.question"<br><br>into:<br><br>set tgqdb ""<br><br>then i write these things:<br><br>#TEST<br><br>set filerandomtimer 10<br><br>timer $filerandomtimer randomfile<br><br>proc randomfile {} {<br>   global filerandomtimer botnick<br> <br>   if {$tgqdb == "/usr/home/bla/scripts/question1"} {<br>      set tgqdb "/usr/home/bla/scripts/question2"<br>   }<br>} else {<br>     set tgqdb "/usr/home/bla/scripts/question1"<br>   timer $filerandomtimer randomfile<br> }<br>}<br>#<br><br>but this script did'nt work and i dont know where's wrong, when i try to load my bot in shell there's a message error like this:<br><br>[02:12] Tcl error in file 'trivegg':<br>[02:12] wrong # args: should be "proc name args body"<br>    while executing<br>"proc randomfile {} {<br>   global filerandomtimer botnick<br><br>   if {$tgqdb == "/usr/home/bla/scripts/question1"} {<br>      set tgqdb "/usr/home/bla/scri..."<br>    (file "scripts/test.tcl" line 259)<br>    invoked from within<br>"source scripts/test.tcl"<br>    (file "bot" line 205)<br>[02:12] * CONFIG FILE NOT LOADED (NOT FOUND, OR ERROR)<br>-bash-2.05b$<br><br>Is there any 1 can help me pls? i dont know much about tcl, but i dont wanna my bot get killed anymore, so i'll apreciate any help from you guys <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_sad.gif" width="15" height="15" alt=":(" title="Sad"><p>Statistics: Posted by Guest — Fri Sep 06, 2002 5:53 am</p><hr />
]]></content>
	</entry>
	</feed>
