Thanks for your answer!
Here is a (shortened, debug) example of my code, i changed (included) the red part now, and it works as expected:
I didn't write the red part before and was thinking the player object is enough, but the isOnline() function requires an index and not a player object (I guess). After your answer it was clear! It'd be more logical for me, if it accepts a player object (too) but ok, this is the way! Thanks again!
Trance