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.

!word does not start the game

Old posts that have not been replied to for several years.
Locked
T
Tommymailno

!word does not start the game

Post by Tommymailno »

Hi,
I'm curious as to why a part of a word game script won't work. Some of the commands work, but the !word command typed into the channel by users doesn't start the word game.

Here is the parts I'm having trouble with:

Code: Select all

bind pub - !word pub_word

Code: Select all

proc pub_word {nick uhost handle channel args} {
   global wscorefile wlistfile words word_list_count answer winuse \
chan letone lettwo letters specuser glonoff
   if {$glonoff == 0} {
	putserv "PRIVMSG $channel :Sorry, wordgame is turned off, try again later"
	return
   } 
   set chn [string tolower $channel]
   if {$word_list_count == 0} {
       if {![validuser $specuser]} {
          set channels [channels]
          adduser $specuser specuser!special@word.special.org
          foreach chann $channels {
             setuser $specuser XTRA wcount.$chann 0
          }
       }
       set word_list_count [getuser $specuser XTRA wcount.$chn]
       if {$word_list_count == ""} {
          setuser $specuser XTRA wcount.$chn 0
          set $word_list_count 0
       }  
       set words ""	
       set fd [open $wlistfile r]
       while {![eof $fd]} {
          lappend words [gets $fd]
       }
       close $fd
I'm a bit new to Eggdrop. And I hope to learn from this experience, so any help to this problem will be hugely appreciated.
Thanks!
:)
User avatar
Xpert
Halfop
Posts: 88
Joined: Mon Mar 08, 2004 7:03 am

Re: !word does not start the game

Post by Xpert »

Tommymailno wrote:but the !word command typed into the channel by users doesn't start the word game.
There is no command that starts the game in the code you have post :-?
Xpert.
User avatar
]Kami[
Owner
Posts: 590
Joined: Thu Jul 24, 2003 2:59 pm
Location: Slovenia
Contact:

Post by ]Kami[ »

Hehe it is, but in first code table :mrgreen:
User avatar
stdragon
Owner
Posts: 959
Joined: Sun Sep 23, 2001 8:00 pm
Contact:

Post by stdragon »

I don't think you posted the whole script, because nothing in the script ever sends any kind of word to the server, except "the game is turned off". So it's hard to say what the error is. Maybe your word list is empty? Who knows.
T
Tommymailno

Post by Tommymailno »

I figured out what the problem was. There was an error in another part of that script that I somehow failed to notice. Happy to say that everything works great now. :mrgreen:

Anyways, guys, sorry about wasting a bit of your time. And, thanks for trying to help out,
Locked