You can have however many $iif's as you want, as long as you're using the correct syntax, which you aren't. You also don't need to use another, since the second $iif seems to always be true if the first one is.

Now, tell me how the exp.ini looks like and what it has to do with rank.ini. Cause I can't know for sure. But as far as I can tell, you can just do it with some simple if statements.
Code:
if ($readini(rank.ini,$1,rank) { msg # user is ranked: $v1 }
Code:
if ($readini(exp.ini,$1,exp) { msg # user has $v1 exp. }
You can obviously use $iif to shorten it down to one line in a single message, but if you feel like this way is easier, by all means.

And, to stop going past 50, you just gotta make it only work if it is less than 50.
Code:
alias -l add.pts {
  var %r $readini(Rank.ini,$1,Rank)
  if (%r < 50) writeini -n Rank.ini $1 Rank $calc($v1 + 1)
}


Nillens @ irc.twitch.tv
Nillen @ irc.rizon.net