From mboxrd@z Thu Jan 1 00:00:00 1970 From: patroclo7@gmail.com (Giorgio Lando) Date: Sat, 05 Jan 2008 22:29:56 +0100 Subject: [sup-talk] how to have an hook play a sound In-Reply-To: <1199558282-sup-230@south> References: <1199552937-sup-9378@clarabella.clarabella> <1199558282-sup-230@south> Message-ID: <1199568499-sup-4708@clarabella.clarabella> > Just remove the '@'. The variable 'num' is what you want; '@num' refers > to a different, instance, variable. @num is undefined, so it defaults to > 'nil', and that's why the error was about an undefined method on the nil > object. > > (Incidentally, you can use instance variables to save state between > successive calls to the same hook. Not useful in this case, but in more > complex hooks this is handy.) Thanks, now it sounds properly. As soon as I write something a bit more elaborate. I will publish it in the wiki for sure. Giorgio