The numbered % values are local variables. They are defined in two circumstances: as arguments in user functions, and as loop variables in foreach loops. All of the numbered local variables defined in a given MUDL function must be different numbers, that is, you can't have two loops both using %1 and you can't let a loop use %1 if the function is a user function with an argument that already uses %1.
The type of the numbered variables is always well-defined, but exactly what it is depends on the circumstances. For instance in a user-defined function fn_b_saves_ci, %1 would be a character and %2 would be an integer. If you had a foreach loop inside this function, that loop would have to use %3 or higher for its loop variable.