Code:
  on *:TEXT:!mmafia out:#:{
  var %x
  if (%plyr1 == $nick) set %x 1
  else if (%plyr2 == $nick) set %x 2
  else if (%plyr3 == $nick) set %x 3
  while (%x < 3) {
    set [ % $+ plyr $+ [ %x ] ] [ % $+ plyr $+ $calc(%x + 1) ]
    inc %x
  }
  set [ % $+ plyr $+ [ %x ] ] none
  notice $nick You are no longer signed up.
  dec %plyrs
}

%plyr1 %plyr2 and %plyr3 should have a string value equal to someones nick or none. whenever someone with a nick equal to one of em types !mmafia out, it'll remove them from the list and cascade any one above them down. So it should output:
(assuming it was plyr1 who typed !mmafia out)
%plyr1 (whatever %plyr2 was)
%plyr2 (whatever %plyr3 was)
%plyr3 none
for some reason the set line in the loop sets it as just %x + 1 so i get:

%plyr1 2
%plyr2 3
%plyr3 none

I've tried lots of bracket combinations and various $+ arrangements and i still get same results. I think the same problem is occuring in this line:

Code:
  notice [ % $+ plyr $+ [ %x ] ] You are mafia.


which sends the notice to whatever X is.