I don't see what your loop is even doing. It's looping from 0 to 31 (when it should be 1 to 32 if its an actual player id, and #1-#XXX if it's a userid) and stopping when the arg matches the loop index value. Why don't you just skip this part? Maybe use cmd_target() instead to validate it hit a valid, and acceptable, player index.