Fixed. Turns out not sending a parameter to a procedure means the variable will be set to '' as opposed to null. And set_pinv(), if given a truncated playername, will find the closest player match. Since it was given '', it still tries to find the closest match, which unfortunately it was players in survival.