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

	<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-18T13:55:27-04:00</updated>

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

		<entry>
		<author><name><![CDATA[aRTiST]]></name></author>
		<updated>2009-04-17T12:02:34-04:00</updated>

		<published>2009-04-17T12:02:34-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=88483#p88483</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=88483#p88483"/>
		<title type="html"><![CDATA[Thanks a lot :D]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=88483#p88483"><![CDATA[
First of all THX <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_biggrin.gif" width="15" height="15" alt=":D" title="Very Happy"><br><br>The hint leads me the right way.<br><br>There was an "Sign" in that var <div class="codebox"><p>Code: </p><pre><code></code></pre></div>That "" wouldnt be stripped by "set amount [stripcodes abcgru $amount]"<br><br>Now i have to remove that crap, not sure how but perhaps ill find a way.<br><br>thx nml375<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=10602">aRTiST</a> — Fri Apr 17, 2009 12:02 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[nml375]]></name></author>
		<updated>2009-04-17T11:27:28-04:00</updated>

		<published>2009-04-17T11:27:28-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=88481#p88481</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=88481#p88481"/>
		<title type="html"><![CDATA[[SOLVED] missing close parenthesis]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=88481#p88481"><![CDATA[
A close parenthesis is actually a ")". Most likely, it's this:<div class="codebox"><p>Code: </p><pre><code>double(3.7G)</code></pre></div> where the G is to blame. Edit it to use proper integers, and it should work.<br><br>Edit: Think I hit submit abit early. It would seem the do:format proc fails to remove that G. It does use string map to remove GB, but that would fail to remove a simple G. Possible faulty/corrupt data in $amount ?<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=8052">nml375</a> — Fri Apr 17, 2009 11:27 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[aRTiST]]></name></author>
		<updated>2009-04-18T13:55:27-04:00</updated>

		<published>2009-04-17T11:09:11-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=88479#p88479</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=88479#p88479"/>
		<title type="html"><![CDATA[[SOLVED] missing close parenthesis]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=88479#p88479"><![CDATA[
<div class="codebox"><p>Code: </p><pre><code>proc do:format {amount} {set amount [stripcodes abcgru $amount]if {[string match "*KB." $amount]} {set amount [string map {"KB." ""} $amount]set amount [expr double($amount)*1024]} elseif {[string match "*MB." $amount]} {set amount [string map {"MB." ""} $amount]set amount [expr double($amount)*1024*1024]} elseif {[string match "*GB." $amount]} {set amount [string map {"GB." ""} $amount]set amount [expr double($amount)*1024*1024*1024]} elseif {[string match "*TB." $amount]} {set amount [string map {"TB." ""} $amount]set amount [expr double($amount)*1024*1024*1024*1024]} elseif {[string match "*PB." $amount]} {set amount [string map {"PB." ""} $amount]set amount [expr double($amount)*1024*1024*1024*1024*1024]} else {set amount [string map {"B." ""} $amount]set amount $amount}return $amount}proc format_1024_units {value} {set len [string length $value]if {$value &lt; 1024} {return [format "%s B" $value]} else {set unit [expr {($len - 1) / 3}]return [format "%.1f %s" [expr {$value / pow(1024,$unit)}] [lindex [list B KB MB GB TB PB EB ZB YB] $unit]]}}</code></pre></div>This is part of a script that im trying to use, but i allways got the following error <div class="codebox"><p>Code: </p><pre><code>Tcl error [do:addnukes]: syntax error in expression "double(235929600)+double(3.7G)": missing close parenthesis at end of function call</code></pre></div>The error leads to that part :<div class="codebox"><p>Code: </p><pre><code>set newcredits_day [expr double([lindex $userdata_day 0])+double([do:format $amount])]set newcredits_week [expr double([lindex $userdata_week 0])+double([do:format $amount])]set newcredits_month [expr double([lindex $userdata_month 0])+double([do:format $amount])]</code></pre></div><br>In my opinion parenthesis is a missing "}" , but i cant find an unclosed one.<br><br>i would be very happy for every help in that problem.<br><br>greets arti<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=10602">aRTiST</a> — Fri Apr 17, 2009 11:09 am</p><hr />
]]></content>
	</entry>
	</feed>
