mIRC Home    About    Download    Register    News    Help

Print Thread
#124540 08/07/05 04:58 AM
Joined: Jan 2004
Posts: 129
A
AaronL Offline OP
Vogon poet
OP Offline
Vogon poet
A
Joined: Jan 2004
Posts: 129
Good morning all.

for my trivia-game i wrote a code to give users a voice when they reach 500 points or more. Works, but a message to inform them is showed each time they have a question well answered. My code is:

Code:
  
   if (%cryptos.zelfpunt >= 500) && ($nick !isvoice $chan) { /msg #trivia Opgelet:  $nick heeft  meer dan 500 punten. Extra modus wordt toegevoegt | /mode #trivia +v $nick }


translated:
Attention $nick has reached 500 points or more. extra modus added.

Greetings
Aaron


Deridio fatum
#124541 08/07/05 06:12 AM
Joined: Sep 2003
Posts: 4,230
D
Hoopy frood
Offline
Hoopy frood
D
Joined: Sep 2003
Posts: 4,230
Since you hardcoded #trivia in everywhere else and also havent shown us what Event this goes off on, im assuming the problem is its not a channel event, and thus $chan has no value, so try...

Code:
  
   if (%cryptos.zelfpunt >= 500) && ($nick !isvoice #trivia) { msg #trivia Opgelet:  $nick heeft  meer dan 500 punten. Extra modus wordt toegevoegt | mode #trivia +v $nick }


PS: i removed the /, you dont need them inside scripts!

#124542 08/07/05 06:39 AM
Joined: Jan 2004
Posts: 129
A
AaronL Offline OP
Vogon poet
OP Offline
Vogon poet
A
Joined: Jan 2004
Posts: 129
hi DaveC

the trigger was Alias -l geef.voice (code) end;

and indeed its working now since i changed $chan into #trivia as you suggested.

Thank you.

Greetz
Aaron


Deridio fatum

Link Copied to Clipboard