BROKER_GOTO_LABEL_ALREADY_DEFINED(-315): Error parsing line x of script "Finance.exe"

  • 7940296
  • 19-Aug-2009
  • 24-Jan-2014

Environment

SecureLogin
SecureLogin SSO
All Versions


Situation

Issue

The SSO administrator is enabling an application and is using sub routines that are called within the application definition. When they run the application the following error appears;

BROKER_GOTO_LABEL_ALREADY_DEFINED(-315): Error parsing line x of script ""Finance.exe"" OK More

Resolution

Cause

Sub routines are often used to simplify flow or for efficiency, typically when lines would otherwise need to be repeated.

The customer was calling sub routines and had labelled two sub routines with the same name. The issue occurred because they had copied and pasted a sub routine and forgotten to change the “label” of the sub routine. For example, if you use Call Logon as per the following;

 #=============# # Logon Prompt # #=============# Dialog Title “Log in” Class #32770 EndDialog Call Logon 

A corresponding sub routine must exist in the application definition, typically at the very top or very bottom in a sub routines section. The label is the word immediately after the Sub command and is the name of the subroutine that is called.

#=================# 
# Logon Sub Routine # 
#=================# 
Sub Logon 
Type $Username #1001 
Type $Password #1002 
Type $Domain #1003 
Click #1 
EndScript 
EndSub 

Sub routines must have unique names.

The customer had 2 sub routines within the same script both labelled “Logon”. The 2nd sub routine was changed to “ChangePassword” to reflect its purpose.