mIRC Homepage
Posted By: VvVvV Warn Script - 27/08/06 09:23 AM
I don't know why this won't work...
Code:
on *:TEXT:!warn*:#:{
  if ($nick isop $chan) || ($nick ishop $chan) && (!%warnings.for. $+ $address($2,2)) {
    inc %warnings.for. $+ $address($2,2)
    notice $2 1st warning
  }
  elseif ($nick isop $chan) || ($nick ishop $chan) && (%warnings.for. $+ $address($2,2) == 1) {
    inc %warnings.for. $+ $address($2,2)
    notice $2 2nd warning
  }
  elseif ($nick isop $chan) || ($nick ishop $chan) && (%warnings.for. $+ $address($2,2) == 2) {
    inc %warnings.for. $+ $address($2,2)
    ban -ku $+ 5 $chan $2 2 3rd warning
  }
  elseif ($nick isop $chan) || ($nick ishop $chan) && (%warnings.for. $+ $address($2,2) == 3) {
    inc %warnings.for. $+ $address($2,2)
    notice $2 4nd warning
    mode $chan +b $address($2,2)
    kick $chan $2 4th warning
  }
}

Anyone?
Posted By: billythekid Re: Warn Script - 27/08/06 09:43 AM
try
(!$(% $+ warnings.for. $+ $address($2,2), 3 ))
($(% $+ warnings.for. $+ $address($2,2), 3 ) == 1)

etc
Posted By: VvVvV Re: Warn Script - 27/08/06 09:58 AM
thx, i dont get it but it works lol
Posted By: billythekid Re: Warn Script - 27/08/06 10:26 AM
it's down to the evaluation of the variables. in your example mirc will try to evaluate %warnings.for(which of course is $null) BEFORE it appends $address($2,2) which doesntr work, splitting the % and the var name forces it to string them together and then evaluate them using the $eval(or in this case the shortened $() ) to evaluate once the joining is done.
© mIRC Discussion Forums