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.

just want to use vars in procs..

Old posts that have not been replied to for several years.
Locked
b
bigmo

just want to use vars in procs..

Post by bigmo »

i just wanna know why this dosen't work.. (var not known)
set fame "NewInformation.info"

bind pub m "!setnews" setnews

proc setnews {nick uhost hand chan text} {
global fname
set WriteFile [open $fname w]
puts $WriteFile $text
close $WriteFile
putserv "NOTICE $nick : set news to: $text"
}
t
tainted
Master
Posts: 239
Joined: Sun May 12, 2002 8:00 pm
Location: chicago
Contact:

Post by tainted »

Wow, an easy one!

Code: Select all

set fame "NewInformation.info" 

Code: Select all

global fname 
set WriteFile [open $fname w] 
You either need to change all the "fname"'s to "fame", or that "fame" to "fname". 8)
b
bigmo

Post by bigmo »

rofl..i didn'T find this *g*
Locked