Ah, so (_this select 1) is a parameter from the action command itself.
If my memory servers me correctly the second value in _this from an action is always 'the one who did the action'.
So if Bob pressed the surrender action (_this select 1) is Bob.
So your line would read
_unit allowfleeing Bob when it should say
Bob allowfleeing _number-from-zero-to-one or even
(group Bob) allowfleeing _number-from-zero-to-oneSo earlier in your script define _number-from-zero-to-one = 0-1 depending on what you want it to be, and then just change the line giving the error..
Still I must say, I don't understand what you're trying to accomplish with this allowfleeing command, as it does nothing to players, just the AI groups.