egghelp.org community Forum Index
[ egghelp.org home | forum home ]
egghelp.org community
Discussion of eggdrop bots, shell accounts and tcl scripts.
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

helproom script

 
Post new topic   Reply to topic    egghelp.org community Forum Index -> Scripting Help
View previous topic :: View next topic  
Author Message
LiquidIce
Halfop


Joined: 09 Jan 2004
Posts: 48
Location: USA

PostPosted: Sat Sep 09, 2006 11:16 pm    Post subject: helproom script Reply with quote

!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
View user's profile Send private message
demond
Revered One


Joined: 12 Jun 2004
Posts: 3073
Location: San Francisco, CA

PostPosted: Sat Sep 09, 2006 11:41 pm    Post subject: Reply with quote

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
View user's profile Send private message Visit poster's website
DragnLord
Owner


Joined: 24 Jan 2004
Posts: 711
Location: C'ville, Virginia, USA

PostPosted: Sat Sep 09, 2006 11:43 pm    Post subject: Reply with quote

1) nowhere in that script is the variable "nick_to_help" set
2) no need to unset the nick variable
Back to top
View user's profile Send private message
Alchera
Revered One


Joined: 11 Aug 2003
Posts: 3344
Location: Ballarat Victoria, Australia

PostPosted: Sat Sep 09, 2006 11:51 pm    Post subject: [code] [/code]tags Reply with quote

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
View user's profile Send private message Visit poster's website
LiquidIce
Halfop


Joined: 09 Jan 2004
Posts: 48
Location: USA

PostPosted: Sun Sep 10, 2006 12:02 am    Post subject: Reply with quote

sorry about that forgot about the code button.
Back to top
View user's profile Send private message
demond
Revered One


Joined: 12 Jun 2004
Posts: 3073
Location: San Francisco, CA

PostPosted: Sun Sep 10, 2006 12:50 am    Post subject: Reply with quote

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
View user's profile Send private message Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic    egghelp.org community Forum Index -> Scripting Help All times are GMT - 4 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Forum hosting provided by Reverse.net

Powered by phpBB © 2001, 2005 phpBB Group
subGreen style by ktauber