mIRC Home    About    Download    Register    News    Help

Print Thread
Joined: Feb 2015
Posts: 7
Nutrimatic drinks dispenser
OP Offline
Nutrimatic drinks dispenser
Joined: Feb 2015
Posts: 7
What can be wrong?

Code:
ON *:JOIN:#:{
  IF ($nick !isop # && $nick !isvoice # ) {
    if (%sig < $ctime) {
      msg $nick Hellooooooooooooo
      %sig = $ctime + 29
    }
  }


Thank you so much guys!

Joined: Nov 2014
Posts: 27
N
Ameglian cow
Offline
Ameglian cow
N
Joined: Nov 2014
Posts: 27
Try this

Code:
ON *:JOIN:*:{ 
  /query $nick Hellooooooo
}

Joined: Feb 2015
Posts: 243
O
Fjord artisan
Offline
Fjord artisan
O
Joined: Feb 2015
Posts: 243
Code:
ON *:JOIN:#:{
;should be
ON *:JOIN:#: {

You missed a space here!


Code:
IF ($nick !isop # && $nick !isvoice # ) {
;You need to  close the parenthesis and open one after the &&
IF ($nick !isop #) && ($nick !isvoice #) {

Also i think you wanna add 29 seconds to $ctime but for that you need $calc and also you must give a value to %sig before checking for it.
And you miss one closing bracket }
So the final code will be:
Code:
ON *:JOIN:#: {
  IF ($nick !isop #) && ($nick !isvoice #) {
%sig = $calc($ctime + 29)
    if (%sig < $ctime) {
      msg $nick Hellooooooooooooo
      %sig = $ctime + 29
    }
  }
}

But.. if you add 29 seconds to $ctime .. %sig will not be less than $ctime .. So it wont trigger. What was your goal?
I hope i helped smile

Last edited by OrFeAsGr; 22/10/15 06:13 PM.
Joined: Jan 2004
Posts: 1,358
L
Hoopy frood
Offline
Hoopy frood
L
Joined: Jan 2004
Posts: 1,358
The only thing logically wrong is that %sig must exist before the comparison is made; spacing, parentheses, and simple arithmetic without $calc are not incorrect.


Link Copied to Clipboard