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

	<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>2004-04-21T10:27:39-04:00</updated>

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

		<entry>
		<author><name><![CDATA[caesar]]></name></author>
		<updated>2004-04-21T10:27:39-04:00</updated>

		<published>2004-04-21T10:27:39-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=35755#p35755</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=35755#p35755"/>
		<title type="html"><![CDATA[Replacing line in file]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=35755#p35755"><![CDATA[
it dies cos you haven't supplied all the arguments, so, use something like:<div class="codebox"><p>Code: </p><pre><code>proc save_hlowscores {} { global hlowscorearray scorefile hlowscore set fp [open $scorefile w] puts $fp [uplevel 1 [list array get $hlowscorearray]] close $fp return 0 } </code></pre></div>and timer 1 <ul></ul><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=187">caesar</a> — Wed Apr 21, 2004 10:27 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[zleppy]]></name></author>
		<updated>2004-04-21T06:16:32-04:00</updated>

		<published>2004-04-21T06:16:32-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=35749#p35749</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=35749#p35749"/>
		<title type="html"><![CDATA[Replacing line in file]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=35749#p35749"><![CDATA[
hmm...ok...almost done now...only one thing...<br>i found this proc:<blockquote class="uncited"><div> proc save_hlowscores {nick host hand chan arg} {<br>  global hlowscorearray scorefile hlowscore<br>  set fp [open $scorefile w]<br>  puts $fp [uplevel 1 [list array get $hlowscorearray]]<br>  close $fp<br>return 0<br>}</div></blockquote>or..have edited it some...<br>but how should i set a timer do do it?<br>i tried "timer 1 save_hlowscores", but that only crashed the bot...<br><br>-zleppy-<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=4821">zleppy</a> — Wed Apr 21, 2004 6:16 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[caesar]]></name></author>
		<updated>2004-04-21T00:34:15-04:00</updated>

		<published>2004-04-21T00:34:15-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=35745#p35745</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=35745#p35745"/>
		<title type="html"><![CDATA[Replacing line in file]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=35745#p35745"><![CDATA[
dose your_array(thing) exists?<div class="codebox"><p>Code: </p><pre><code>if {![info exists your_array(thing)]} {# do whatever}</code></pre></div>and increase it with "incr your_array(thing)"<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=187">caesar</a> — Wed Apr 21, 2004 12:34 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[zleppy]]></name></author>
		<updated>2004-04-20T16:19:59-04:00</updated>

		<published>2004-04-20T16:19:59-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=35742#p35742</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=35742#p35742"/>
		<title type="html"><![CDATA[Replacing line in file]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=35742#p35742"><![CDATA[
thanks...i found a script that works...but now i have the problem that i cant figure out how to check if the array is existing...like...<br>a new user gets a point..ok... set $score($nick) 1<br>but what about a old user...how do i add 1 up to the existing value?<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=4821">zleppy</a> — Tue Apr 20, 2004 4:19 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[caesar]]></name></author>
		<updated>2004-04-20T15:22:39-04:00</updated>

		<published>2004-04-20T15:22:39-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=35737#p35737</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=35737#p35737"/>
		<title type="html"><![CDATA[Replacing line in file]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=35737#p35737"><![CDATA[
Working with files had been discussed before a lot of times, even there is an example how to add, remove and replace an certain line from an text file, do an forum search. Also, I belive it will be a lot easier if you store the results in arrays and save them every 5 minutes or whatever to a file as backup. This also had been discussed before with examples and parts of code ofcource.<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=187">caesar</a> — Tue Apr 20, 2004 3:22 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[zleppy]]></name></author>
		<updated>2004-04-20T14:45:46-04:00</updated>

		<published>2004-04-20T14:45:46-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=35735#p35735</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=35735#p35735"/>
		<title type="html"><![CDATA[Replacing line in file]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=35735#p35735"><![CDATA[
Hi i'm trying to make a higher/lower-game for a channel, and want to keep track of the scores...but i havent found out how to replace a line in a file...<br>i want to put the nick who guessed the corerct number in a file, or if it exists, just replace the line (and increase the number on it)..<br>got everything else covered...just this little part left...plz help <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_wink.gif" width="15" height="15" alt=";)" title="Wink"><br>-zleppy-<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=4821">zleppy</a> — Tue Apr 20, 2004 2:45 pm</p><hr />
]]></content>
	</entry>
	</feed>
