You are not showing enough code to determine the error. Post your entire code if you want the best help.
- Show when the above code gets called
- Show where 'player' variable is assigned a value
- You do not show where cs_get_user_team is used
Based on the type of error (invalid player 14) can possibly mean you called this function via set_task and the player has disconnected within the time set_task was called and the interval\time used in your set_task call.
__________________