Hey. The past month or two, my sub bot has not been properly counting resubs and just defaulting to 0. I didn't change anything that would cause this, but don't know what I need to update to fix it.

The main section of the code:
  if (($msgtags(msg-id).key == sub) && ($1 == #CHANNEL_NAME)) {
    var %nick $iif($msgtags(display-name).key, $v1, $msgtags(login).key)
    msg $1 EMOTE_HERE Welcome %nick to blah blah blah EMOTE HERE
  elseif (($msgtags(msg-id).key == resub) && ($1 == #CHANNEL_NAME)) {
    var %nick $iif($msgtags(display-name).key, $v1, $msgtags(login).key)
    if ($0 == 1) {
      msg $1 EMOTE_HERE Thanks %nick for $msgtags(msg-param-months).key months in a row! EMOTE_HERE

Mainly looking at the $msgtags(msg-param-months).key section here and why it would stop counting.

Any input is appreciated.