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.
Old posts that have not been replied to for several years.
NewzUK
Master
Posts: 200 Joined: Mon Nov 18, 2002 3:10 am
Location: Auckland, New Zealand
Contact:
Post
by NewzUK » Tue Nov 23, 2004 10:48 pm
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}
}
NewzUK
Master
Posts: 200 Joined: Mon Nov 18, 2002 3:10 am
Location: Auckland, New Zealand
Contact:
Post
by NewzUK » Tue Nov 23, 2004 11:48 pm
thanks gb - will try that...
Ofloo
Owner
Posts: 953 Joined: Tue May 13, 2003 1:37 am
Location: Belguim
Contact:
Post
by Ofloo » Sun Nov 28, 2004 8:38 am
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
NewzUK
Master
Posts: 200 Joined: Mon Nov 18, 2002 3:10 am
Location: Auckland, New Zealand
Contact:
Post
by NewzUK » Sun Nov 28, 2004 4:47 pm
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