All pastes #2060729 Raw Edit

Miscellany

public text v1 · immutable
#2060729 ·published 2011-05-15 21:36 UTC
rendered paste body
On *:SockRead:combat: {
  if ($sockerr) { halt }
  Else {
    var %combat
    sockread %combat
    if (*Combat* iswm %combat) {
      //echo -a working1
      tokenize 62 %combat | set %usercombat $remove($5,<span style="vertical-align:middle;")
      if (%search == display) { 
        msg %chan 4Topic Name:2 %topictitle 4Username:2 %topicuser 4Combat level:9 %usercombat 4URL:1 %topicurl
        sockclose $sockname
      }
      elseif (%search == combat) {
        echo -a WE GOT HERE
        tokenize 46 %usercombat | set %theusercombat $1
        if (%theusercombat == %combat) || ($calc( $+ %theusercombat $+ +1) == %combat) || ($calc( $+ %theusercombat $+ -1) == %combat) {
          echo -a we defo got here
          msg %chan 4Topic Name:2 %topictitle 4Username:2 %topicuser 4Combat level:9 %usercombat 4URL:1 %topicurl
        }
      }
    }
  }
}


It doesn't execute line 17 or 18

%theusercombat = 82
%combat = 82



When I use this:
//if (%theusercombat == %combat) || ($calc( $+ %theusercombat $+ +1) == %combat) || ($calc( $+ %theusercombat $+ -1) == %combat) { echo -a hello }

It returns: hello