If when using the API commands PA_Alert, PA_Confirm, or PA_Request garbage is displayed along with the Alert text you need to quit and initialize the Text/String variables to an empty string before using. If you do not there is a very good chance that the Variables will be filled with random ascii characters from being assigned in memory. By assigning the variable to an empty string you remove the garbage characters. The PA_Alert command example below demonstrates this. Note the variable Display_Text is assigned to an empty string.
void Display_Alert( PA_PluginParameters params )
{
long DisplayText_len;
char DisplayText[256]="";
DisplayText_len = PA_GetTextParameter( params, 1, DisplayText );
PA_Alert(DisplayText);
}
For more information on 4D Plug-in development? Visit:
https://www.4D.com/SDK