This is the new home of the egghelp.org community forum.
All data has been migrated (including user logins/passwords) to a new phpBB version.


For more information, see this announcement post. Click the X in the top right-corner of this box to dismiss this message.

can anyone tell me why this dont work please

Old posts that have not been replied to for several years.
Locked
[
[Nero]
Voice
Posts: 29
Joined: Mon May 27, 2002 8:00 pm

Post by [Nero] »

set isopen 0
set chan "#mychan"
###################
bind dcc o botopen botopen
proc botopen {nick idx arg} {
if {isopen = 1} {
putdcc $idx "Passw0rdz Is ALready open"
}else{
putserv "TOPIC $chan : |Open|"
set isopen 1
}
}
putlog "Script Loaded "


all i can get is extra characters after close-brace or cannot read isopen

Thankvm you
P
Petersen
Owner
Posts: 685
Joined: Thu Sep 27, 2001 8:00 pm
Location: Blackpool, UK

Post by Petersen »

because you haven't declaired isopen and chan as global variables in the proc, you've missed a $ in the if statement, and you've missed spaces before and after the else.
Y
Ycarus

Post by Ycarus »

So the script is now :

Code: Select all

set isopen 0 
set chanbotopen "#mychan" 
################### 
bind dcc o botopen botopen 
proc botopen {nick idx arg} { 
  global isopen chanbotopen
  if {$isopen = 1} { 
    putdcc $idx "Passw0rdz Is ALready open" 
  } { 
    putserv "TOPIC $chanbotopen : |Open|" 
    set isopen 1 
  } 
} 
putlog "Script Loaded " 
[
[Nero]
Voice
Posts: 29
Joined: Mon May 27, 2002 8:00 pm

Post by [Nero] »

thanx Guys
Locked