My guess is that using the dot between the first two variables is making PHP join the variables. If so, to the SC macro you’re actually passing less paramaters that you think and shifted by one position.
So yours:
sc_redir($redir_app.$redir_param, "" , "modal" , 700 , 800);
is parsed as:
sc_redir(
$redir_app.$redir_param, <-- Application
"", <-- Parameter
"modal", <-- Target
700, <-- Error
800 <-- height_modal
<-- width_modal (missing parameter)
);
If my theory is correct, you should be able to fix it like this:
sc_redir($redir_app.$redir_param , "" , "modal" , "" , 700 , 800);
that wil get parsed as:
sc_redir(
$redir_app.$redir_param, <-- Application
"", <-- Parameter
"modal", <-- Target
"", <-- Error
700, <-- height_modal
800 <-- width_modal
);