proc one {nick uhost handle channel args} {
some code
}
proc two {} {
some code
one
}
proc three {nick uhost handle channel args} {
some code
one
}
I want to recall proc one after proc two and proc three run their course. The way I have it (without the inner code of the procs shown here) is not working. What's the right way to do this?
Last edited by Landslyde on Mon Apr 24, 2017 11:18 pm, edited 1 time in total.
"is not working"
It would help if you would show us the error message that you are seeing in the partyline.
In the meantime, I suspect that it will have to do with the wrong number or arguments.
Think of the proc that you have named "one" as that you have created a new tcl command, named "one". You can call it and use it. However, by the design of it, "one" wants to be passed five command line arguments.
In proc two, you will have to re-think that - so that you have something to pass to "one" when you call it.
You can hard code it, if that will fit your needs.
In proc three, it looks like the usage would be:
one $nick $uhost $handle $chan $text
(I agree with caesar. args is special. I don't even use "arg", even though that is not special.... it just looks close to the human eye. )
Big note ! :
With the very limited sample code we are working with here - aren't we creating an infinite loop? Have another look, and think about it.
I hope I have not misled you - I just woke up and am not firing on all cylinders yet.
For a fun (and popular) Trivia game, visit us at: irc.librairc.net #science-fiction . Over 300K Q & A to play in BogusTrivia !
This is a game script. The user calls the game with !word
If no one guess the puzzle, the game ends.
If the puzzle is guessed, the game also ends.
I have the code in that post. I want to be able to automatically call the proc pub_word after either of the above two events happen, rather than have the user continuously keep starting a game by using the !word. That's what they all want. But I cant make ti happen at all.