| View previous topic :: View next topic |
| Author |
Message |
LiquidIce Halfop
Joined: 09 Jan 2004 Posts: 48 Location: USA
|
Posted: Sat Sep 09, 2006 11:16 pm Post subject: helproom script |
|
|
!online and !offline doesnt work on my script.
| Code: |
#helproom.tcl
set room1 "#services"
set room2 "#staff"
bind pub - !help help:proc
bind pub - !offline offline:proc
bind pub - !online online:proc
set room1 "#services"
set room2 "#Staff"
proc help:proc {nick uhost hand chan text} {
global room1 room2 nick_to_help
if {[string equal -nocase $chan $room1] && ![info exists nick_to_help]} {
putserv "PRIVMSG $room2 :\002NOTE\002: \002$nick\002 need's help in \002$room1\002. (Message: \002[lrange $text 0 end]\002)"
set $nick
}
}
proc online:proc {nick uhost hand chan text} {
global room1 room2 nick_to_help
if {[string equal -nocase $chan $room2] && [isop $nick $room2] && [info exists $nick_to_help]} {
putserv "PRIVMSG $room1 :\002$nick_to_help\002, please be *patient*. An \002op\002 will be with you in just a \002minute\002$
unset $nick
}
}
proc offline:proc {nick uhost hand chan text} {
global room1 room2 nick_to_help
if {[string equal -nocase $chan $room2] && [isop $nick $room2] && [info exists $nick_to_help]} {
putserv "PRIVMSG $room1 :\002$nick_to_help\002, please try back again *later*. There are \002no ops\002 currently to assist $
unset $nick
}
}
|
error i get is:
[23:13] Tcl error [help:proc]: can't Tcl error [online:proc]: can't read "nick_to_help": no such variableread "LiquidIce": no such variable
Last edited by LiquidIce on Sun Sep 10, 2006 12:01 am; edited 1 time in total |
|
| Back to top |
|
 |
demond Revered One

Joined: 12 Jun 2004 Posts: 3073 Location: San Francisco, CA
|
Posted: Sat Sep 09, 2006 11:41 pm Post subject: |
|
|
for two and a half years on these forums you haven't bothered to learn how to post code; moreover, some of your script's long lines are truncated _________________ connection, sharing, dcc problems? click <here>
before asking for scripting help, read <this>
use [code] tag when posting logs, code |
|
| Back to top |
|
 |
DragnLord Owner

Joined: 24 Jan 2004 Posts: 711 Location: C'ville, Virginia, USA
|
Posted: Sat Sep 09, 2006 11:43 pm Post subject: |
|
|
1) nowhere in that script is the variable "nick_to_help" set
2) no need to unset the nick variable |
|
| Back to top |
|
 |
Alchera Revered One

Joined: 11 Aug 2003 Posts: 3344 Location: Ballarat Victoria, Australia
|
Posted: Sat Sep 09, 2006 11:51 pm Post subject: [code] [/code]tags |
|
|
LiquidIce: Please edit your post and encompass your code within code tags; the button is just below the subject bar. Your post is difficult to read. _________________ Add [SOLVED] to the thread title if your issue has been.
Search | FAQ | RTM |
|
| Back to top |
|
 |
LiquidIce Halfop
Joined: 09 Jan 2004 Posts: 48 Location: USA
|
Posted: Sun Sep 10, 2006 12:02 am Post subject: |
|
|
| sorry about that forgot about the code button. |
|
| Back to top |
|
 |
demond Revered One

Joined: 12 Jun 2004 Posts: 3073 Location: San Francisco, CA
|
Posted: Sun Sep 10, 2006 12:50 am Post subject: |
|
|
your script is still truncated
load it in an editor that can wrap word/lines, then paste here within [code] tags; or cat it into your terminal window, then paste from there _________________ connection, sharing, dcc problems? click <here>
before asking for scripting help, read <this>
use [code] tag when posting logs, code |
|
| Back to top |
|
 |
|