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

	<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-05-10T05:20:00-04:00</updated>

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

		<entry>
		<author><name><![CDATA[Anonymous]]></name></author>
		<updated>2002-05-10T05:20:00-04:00</updated>

		<published>2002-05-10T05:20:00-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=6806#p6806</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=6806#p6806"/>
		<title type="html"><![CDATA[what is wrong with this script?]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=6806#p6806"><![CDATA[
Thanks Mordred<br><br><p>Statistics: Posted by Guest — Fri May 10, 2002 5:20 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Anonymous]]></name></author>
		<updated>2002-05-10T04:48:00-04:00</updated>

		<published>2002-05-10T04:48:00-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=6804#p6804</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=6804#p6804"/>
		<title type="html"><![CDATA[what is wrong with this script?]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=6804#p6804"><![CDATA[
Syntax error in the == expression likely refers to the fact you are comparing strings and not numbers, hence you should enclose the values in quotes.<br><br>if {$level == "wink"}<p>Statistics: Posted by Guest — Fri May 10, 2002 4:48 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Anonymous]]></name></author>
		<updated>2002-05-09T22:17:00-04:00</updated>

		<published>2002-05-09T22:17:00-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=6800#p6800</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=6800#p6800"/>
		<title type="html"><![CDATA[what is wrong with this script?]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=6800#p6800"><![CDATA[
Hi<br><br>Can somebody check this code and tell me what is wrong with it?<br><br># flirt.tcl <br># by ahv - 09/05/2002 <br><br># listen to all ahv commands in channels <br>bind pub - ahv pub:ahv <br><br># limit the chans to listen in by filling them in here ( more chans goes this way {#chan1 #chan2} <br>set enabledchans {#ahv2} <br><br># procedure to check if chan where command is used is listed chan <br>proc isenabledchan { channel } { <br>   global enabledchans <br>   # compare each chan in $enabledchans with current chan and return 1 (true) if chan is listed <br>   foreach enablechan $enabledchans { <br>      if { $channel == $enablechan } { <br>         return 1 <br>      } <br>   } <br>   return 0 <br>} <br><br># main procedure to handle the ahv commands <br>proc pub:ahv { nick uhost handle channel arg } { <br>   # check if command should work in this chan <br>   set chan [string tolower $channel]    <br>   if { ![isenabledchan $chan] } { <br>      return 1 <br>   } <br>   # check if valid command (flirt) <br>   if { [llength $arg] == 0 } { <br>      putserv "PRIVMSG $channel :Unable to perform request, give command." <br>   } else { <br>      # get command and compare it to "flirt" <br>      set command [lindex $arg 0] <br>      set command [string tolower $command] <br>      if { [string compare $command flirt] == 0 } { <br>         # check if valid number of arguments <br>         if { [llength $arg] &lt; 2 } { <br>            putserv "PRIVMSG $channel :razz:lease check the help function if you don't know how to use this command." <br>         # command syntax is ok, process request <br>         } else { <br>            set level [lindex $arg 1] <br>            if { $level == wink } { putserv "PRIVMSG $channel :You can always Wink." }<br>            if { $level == smile } { putserv "PRIVMSG $channel :You need 5 Charm Points to start to Smile" } <br>            if { $level == compliment } { putserv "PRIVMSG $channel :You need 15 Charm Points to start to Compliment." } <br>            if { $level == hug } { putserv "PRIVMSG $channel :You need 30 Charm Points to start to Hug" } <br>            if { $level == kiss } { putserv "PRIVMSG $channel :You need 50 Charm Points to start to Kiss" } <br>            if { $level == backrub } { putserv "PRIVMSG $channel :You need 80 to start to Backrub" } <br>            if { $level == pinch } { putserv "PRIVMSG $channel :Females need 80 Charm Points to start to Pinch. - Males need 120 Charmpoints to start to Pinch." } <br>            if { $level == snuggle } { putserv "PRIVMSG $channel :Females need 120 Charm Points to start to snuggle." } <br>            if { $level == upstairs } { putserv "PRIVMSG $channel :Males need 190 Charm Points to take Lily Upstairs." } <br>            if { $level == invite } { putserv "PRIVMSG $channel :Females need 190 Charm Points to Invite Rowen to their room." } <br>          } <br>       } <br>    } <br>} <br><br>The error i get is:<br>TCL error [pub:ahv]: syntax error in expression " $level == wink "<p>Statistics: Posted by Guest — Thu May 09, 2002 10:17 pm</p><hr />
]]></content>
	</entry>
	</feed>
