Did you read the
Pawn Language Guide? It goes into more detail about the situation in the next paragraph.
However, you might want to first ask yourself, "doesn't actually make sense to use a single function?" Maybe it does, maybe it doesn't but I would probably just start by creating separate functions and verify that that works first and then determine how much of the code in each function is the same. I don't really understand what you're ultimately doing so I can't tell what I would do in your situation.
__________________