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't hand over the var

Old posts that have not been replied to for several years.
Locked
e
eiSiQ

can't hand over the var

Post by eiSiQ »

hi there!

i've got a little problem (yep, again), and i can't find my fault (cause, I'm new to tcl coding? ;))

ok, in one tcl, I've got this code:

Code: Select all

proc pub:bottle {nick uhost hand chan text} {
  set bottle $text
  putserv "NOTICE $nick :Spin the bottle is now: $text."
  putlog "Spin the bottle is now: $text (Set by $nick)"
}
and in another tcl i got this code:

Code: Select all

proc spin_bunny {nick uhost handle chan args} {
global bottle
  if {$bottle == "off"} {
  putserv "NOTICE $nick :Spin the bottle is off."
    return 0
  }
...
...
...
so I set bottle on, by typing: .bottle on
it says: ok, now it's on

but when i type: .spin (the trigger for the bottle_proc) it says: Spin the bottle is off.

But why?

Wheres my fault?

thx for your help!
User avatar
stdragon
Owner
Posts: 959
Joined: Sun Sep 23, 2001 8:00 pm
Contact:

Post by stdragon »

Maybe you forgot to declare bottle global in the first proc?
e
eiSiQ

Post by eiSiQ »

oh yes, this could be, and how?

just as in the second?
Locked