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.

closing file

Old posts that have not been replied to for several years.
Locked
N
NewzUK
Master
Posts: 200
Joined: Mon Nov 18, 2002 3:10 am
Location: Auckland, New Zealand
Contact:

closing file

Post by NewzUK »

Hi - I have a proc that uses lynx to dump a webpage into a text file, read a line to the channel, then close the file. However, I've tried several different ways to close the file but I either get an error message saying 'no such channel $file' or eventually it runs into the 'too many open pipes' problem.

Here's the end of the proc where I'm trying to close the file - if anyone has any ideas where this might be going wrong I'd be gratefull!

putserv "PRIVMSG $channel :7,7 1,15 $line1 "
}
}
catch {close $file}
}
#Newsroom - Where News & Markets Connect
http://www.inewsroom.net
#Newsroom on irc.othernet.org
g
greenbear
Owner
Posts: 733
Joined: Mon Sep 24, 2001 8:00 pm
Location: Norway

Post by greenbear »

have a look here
N
NewzUK
Master
Posts: 200
Joined: Mon Nov 18, 2002 3:10 am
Location: Auckland, New Zealand
Contact:

Post by NewzUK »

thanks gb - will try that...
#Newsroom - Where News & Markets Connect
http://www.inewsroom.net
#Newsroom on irc.othernet.org
O
Ofloo
Owner
Posts: 953
Joined: Tue May 13, 2003 1:37 am
Location: Belguim
Contact:

Post by Ofloo »

hmm i don't think his question is in there .. tho

he wants to know how to check if a channel exists before closing it well u could check if the variable exists that could work maybe try this

Code: Select all

if {[info exists file]} {
  close $file
}
XplaiN but think of me as stupid
N
NewzUK
Master
Posts: 200
Joined: Mon Nov 18, 2002 3:10 am
Location: Auckland, New Zealand
Contact:

Post by NewzUK »

only the error message was the channel, but it's just the file I wanted to close, but found it on the page above - thanks :D
#Newsroom - Where News & Markets Connect
http://www.inewsroom.net
#Newsroom on irc.othernet.org
Locked