5.3 Messages that may be displayed during execution and parsing of AIT files

This section covers the messages that may be displayed during execution and parsing of AIT files. These messages appear in the output window.


AITCE-0001

Unexpected token-1, missing token-2.

Cause
An invalid keyword or symbol token-1 was detected. The script parsing expects the keyword or symbol token-2.
Action
Add token-2 if necessary.
Example
Example of invalid specification:

DEFINE
{
  const integer OK_END = 0;
  const integer NG_END = -1      // ";" is not specified.
  const integer sloop_max = 30;
}

Example of valid specification:

DEFINE
{
  const integer OK_END = 0;
  const integer NG_END = -1;      // ";" has been added.
  const integer sloop_max = 30;
}


AITCE-0002

Unexpected token

Cause
An invalid keyword or symbol token was detected.
Action
Delete the unexpected keyword or symbol.
Example
Example of invalid specification:

DEFINE
{
  integer OK_END = 0;
  integer sloop_max = 0;;      // Two semicolons (;;) are specified.
}

The sloop_max variable contains two semicolons (;;).
Example of valid specification:

DEFINE
{
  integer OK_END = 0;
  integer sloop_max = 0;      // The semicolon (;) has been deleted.
}

One semicolon (;) has been deleted from the sloop_max variable.

AITCE-0003

A function name is used as an identifier.

Cause
A function name cannot be used as an identifier.
Action
Change the identifier name.
Example
Example of invalid specification:

DEFINE
{
  integer AIT_LogMessage = 10;
}

A function name is used as a variable name.
Example of valid specification:

DEFINE
{
  integer AIT_LogMessageNumber = 10;
}

The variable name has been changed to AIT_LogMessageNumber.

AITCE-0005

The number of nested levels is greater than 255.

Cause
The number of nesting levels in the AIT file exceeds 255, which is the maximum.
Action
If the number of nested if, if-else, do-while, while, or switch structure levels exceeds the maximum of 255, the AIT file cannot be parsed. Re-edit the AIT file to decrease the number of nested structure levels.

AITCE-0006

The identifier name exceeds 64 characters.

Cause
Each identifier name can have up to 64 characters. The AIT file contains an identifier name that has more than 64 characters.
Action
Specify an identifier name that has up to 64 characters.
Example
Example of invalid specification:

DEFINE
{
  integer sloop_max = 0;
  integer sample123456sample123456sample123456sample123456sample123456sample = 0;      // The specified variable name has 66 characters.
}

The second variable name has more than 64 characters.
Example of valid specification:

DEFINE
{
  integer sloop_max = 0;
  integer sample123456 = 0;   // The specified variable name
                              // has 64 or fewer characters.
}

The second variable name has 64 or fewer characters.

AITCE-0007

The string constant should not span multiple lines.

Cause
As the first line ends with \n, the string constant is written over two lines.
Action
Specify a string constant in one line.
Example
Example of invalid specification:

DEFINE
{
  integer sloop_max = 0;
  string SoftwareName = " My
                          Setup";  // The string constant is
                                   // written over two lines.
}

A string constant in the SoftwareName variable is written over two lines.
Example of valid specification:

DEFINE
{
  integer sloop_max = 0;
  string SoftwareName = " My Setup";   // The specified string constant is in one line.
}

The string constant for variable SoftwareName is specified in one line.

AITCE-0008

Use a valid escape sequence.

Cause
The string constant for the AIT file specified during execution contains an invalid escape sequence.
Action
Use a valid escape sequence for a string constant.
Example
Example of invalid specification:

DEFINE
{
  integer sloop_max = 0;
  string str1 = "sample'
                 testing";
}

The string variable strl is assigned a string written over two lines but an invalid escape sequence is used.
Instead of an apostrophe ('), an underscore (_) must be used to indicate that the string continues to the next line.
Example of valid specification:

DEFINE
{
  integer sloop_max=10;
  string str1 = "sample_
                 testing";
}

An apostrophe (') is replaced with an underscore (_), which is the correct escape sequence.

AITCE-0009

Identifiers cannot be used in case statements.

Cause
An identifier is specified in the case clause.
Action
Use only constants or macros in the case clause.
Example
Example of invalid specification:

DEFINE
{
  const string FileVersion = "7.1";
  string stMsgText;
}
MAIN
{
  switch (FileVersion)
     case stMsgText:      // An identifier is specified
                          // in the case clause.
   :
        break;
     default:
   :
        break;
  endswitch;
}

The identifier stMsgText is specified in the case clause.
Example of valid specification:

DEFINE
{
  const string FileVersion = "7.1";
  string stMsgText;
}
MAIN
{
  switch (FileVersion)
     case "7.1":      // A string constant which is not
                      // an identifier is specified.
   :
        break;
     default:
   :
        break;
  endswitch;
}

Instead of the identifier stMsgText, a string constant is specified in the case clause.

AITCE-0010

Usage of the "+" or "-" signs is invalid.

Cause
The ++, --, +-, or -+ operator is used in the AIT file. These operators specified in an AIT file cannot be parsed.
Action
Delete the ++, --, +-, or -+ operator from the AIT file.
Example
Example of invalid specification:

DEFINE
{
  integer sloop_count = 0;
}
MAIN
{
  if (AIT_FileExists("#setup.exe") == 0)
     :
     :
     sloop_count++;      // The invalid operator"++" is used to
                         // increment the value of the variable.
  endif;
}

You cannot use the increment and decrement operators.
Since ++ is specified for the sloop_count variable, an error message is displayed.
Example of valid specification:

DEFINE
{
  integer sloop_count = 0;
}
MAIN
{
  if (AIT_FileExists("#setup.exe") == 0)
     :
     :
     sloop_count = sloop_count + 1;   // "++" is not used.
  endif;
}

++ is replaced with another equivalent code.

AITCE-0011

The AIT file contains more than 65535 lines.

Cause
The AIT file can contain up to 65,535 lines. If the AIT file contains more than 65,535 lines, parsing of the AIT file stops.
Action
Reduce the number of lines in the AIT file.

AITCE-0012

identifier : An identifier is undeclared.

Cause
The variable of an undeclared variable type is specified.
Action
Correctly declare the variable in the DEFINE section.
Example
Example of invalid specification:

DEFINE
{
  string stMsgText;
}
MAIN
{
  if (AIT_FileExists("#setup.exe") == 0)
     stMsgText = "Setup(English) " + InstallerName + " Not Found";
     AIT_LogMessage(stMsgText);
     sloop_max = 0;      // This variable is not declared
                         // in the DEFINE section.
  endif;
}

The sloop_max variable is specified in the MAIN section although it is not declared in the DEFINE section.
Example of valid specification:

DEFINE
{
  string  stMsgText;
  integer sloop_max;      // Variable sloop_max has been declared.

}
MAIN
{
  if (AIT_FileExists("#setup.exe") == 0)
     stMsgText = "Setup(English) " + InstallerName + " Not Found";
     AIT_LogMessage(stMsgText);
     sloop_max = 0;     // A declared variable is used.
  endif;
}

The sloop_max variable has been declared in the DEFINE section, and is specified in the MAIN section.

AITCE-0013

identifier: Redeclared.

Cause
The already declared identifier is redeclared.
Action
Delete the redeclared variable.
Example
Example of invalid specification:

DEFINE
{
  integer sloop_max = 10;
  string sloop_max = "sample";     // Variable sloop_max is
                                   // redeclared as the string type.
}

The sloop_max variable that was declared as the integer type is redeclared as the string type.
Example of valid specification:

DEFINE
{
  integer sloop_max = 10;
  string stMsgText = "sample";    // Another variable name is used.
}

The redeclared variable sloop_max has been deleted, and a new variable name is declared.

AITCE-0014

The package information field package-item contains invalid data value.

Cause
Any of the package items in the PACKAGE_INFO section contains an invalid value.
Action
Specify a value adapted to the package information field.
Example
Example of invalid specification:

PACKAGE_INFO
{
  PackageID = "#$@#ADOBEACROBATREADER";   // The package ID contains
                                          // invalid string #$@#.
  Product = "Adobe Reader 6.0";
  Version = "0060";
  InstallerName = "AdbeRdr60_enu_full.exe";
  InstallDrive = "C:";
  InstallDirectory = "'Program Files'\Adobe'\Acrobat 6.0";
}

The package ID in the PACKAGE_INFO section contains an invalid string #$@.
Example of valid specification:

PACKAGE_INFO
{
  PackageID = "ACROBAT-READER";       // Invalid string #$@#
                                      // has been deleted.
  Product = "Adobe Reader 6.0";
  Version = "0060";
  InstallerName = "AdbeRdr60_enu_full.exe";
  InstallDrive = "C:";
  InstallDirectory = "'Program Files'\Adobe'\Acrobat 6.0";
}

The invalid string #$@ has been deleted from the package ID in the PACKAGE_INFO section.

AITCE-0015

A 'const' cannot be re-assigned a value.

Cause
The variable defined as the constant type is assigned a value in the MAIN section.
Action
Change the definition of constant or delete the right side of the constant.
Example
Example of invalid specification:

DEFINE
{
  const float SLEEP_TIME = 2.0;
  integer sloop_count;
}
MAIN
{
  if (AIT_FocusWindow("Setup", "#32770",0.0) > 0)
     AIT_PlayKey("{Enter}");
     AIT_LogMessage("Setup: Enter");
     sloop_count = 0;
     SLEEP_TIME = 3.0;      // The constant value for variable
                            // SLEEP_TIME is being changed.
     AIT_Sleep(SLEEP_TIME);
  endif;
}

The SLEEP_TIME variable defined as the constant float type has been assigned a different value in the MAIN section.
Example of valid specification:

DEFINE
{
  const float SLEEP_TIME = 3.0;
  integer sloop_cnt;
}

MAIN
{
  if (AIT_FocusWindow("Setup", "#32770",0.0) > 0)
     AIT_PlayKey("{Enter}");
     AIT_LogMessage("Setup : Enter");
     sloop_cnt = 0;
     AIT_Sleep(SLEEP_TIME);
  endif;
}

In the MAIN section, assignment to the SLEEP_TIME variable of type constant float has been deleted.

AITCE-0018

The AIT file analysis has been abnormally terminated because of a syntax error in the AIT file.

Cause
The syntax check has encountered a fatal error (including invalid string end processing or invalid character count specification in a variable name).
Action
Correct the error, then re-check the AIT file.
Example
Example of invalid specification:

DEFINE
{
  string ErrorTxt = "ABC
def";
}

Although a string constant cannot be specified over multiple lines, the string is specified over multiple lines.
Example of valid specification:

DEFINE
{
  string ErrorTxt = "ABC_
def";      // "_" indicates the continuation of the string.
}

Add an underscore (_) that indicates that the string continues to the next line.

AITCE-0019

Division by zero

Cause
Because the second operand for division is 0, the division is considered as being undefined for an AIT file parsing.
Action
Specify a value other than 0 as the divisor.
Example
Example of invalid specification:

DEFINE
{
  integer sloop_count = 0;
  const integer  sloop_max = 30;
}  
MAIN
{
  sloop_count = sloop_max / 0;      // As the divisor is 0, this
                                    // results in and error.
}

Although division by 0 is impossible, the sloop_max variable is divided by 0.
Example of valid specification:

DEFINE
{
  integer sloop_count = 0;
  const integer sloop_max = 30;
}  
MAIN
{
  sloop_count = sloop_max / 1;      // The divisor has been changed
                                    // to a value other than 0.
}

The division of the sloop_max variable by 0 has been deleted.

AITCE-0020

data type-1 and data type-2 are incompatible for processing-name.

Cause
The left-side and right-side values for an operator are assigned incompatible data types. For example, if the string and integer types have been used for comparison, this message is displayed.
Action
Specify data types compatible between the left-side and right-side values for an operator.
Example
Example of invalid specification:

DEFINE
{
  const integer ExeVersion = 7;
  const string FileVersion = "7";
}
MAIN
{
  if (ExeVersion == FileVersion)   // The string and integer types
                                   // are used for comparison.
     ...
     ...
  endif;
}

The ExeVersion variable of type integer and the FileVersion variable of type string are compared.
The string and integer types are incompatible for a comparison operation.
Example of valid specification:

DEFINE
{
  const integer ExeVersion = 7;
  const integer FileVersion = 7;
}
MAIN
{
  if (ExeVersion == FileVersion)      // Variables of the same type
                                      // are compared.
     ...
     ...
  endif;
}

The data type of the FileVersion variable has been changed from string to integer to enable comparison.

AITCE-0021

operator-name incompatible for operation data-type-1.

Cause
For the indicated operation, an invalid data type is specified. For example, if the float type has been used for a remainder operation (%) or if the string type has been used for an operation, this message is displayed.
Action
Specify a data type that can be used for the operation.
Example
Example of invalid specification:

DEFINE
{
  float SLEEP_TIME = 7.1;
}
MAIN
{
  SLEEP_TIME = SLEEP_TIME % 2;      // float type cannot be used for
                                    // remainder operation. This
                                    // results in an error.
}

Although the float type cannot be used for a remainder operation, float-type variable SLEEP_TIME is used for the remainder operation.
Example of valid specification:

DEFINE
{
  integer SLEEP_TIME = 7;
}
MAIN
{
  SLEEP_TIME = SLEEP_TIME % 2;      // Integer-type variable is used
                                    // for remainder operation.
}

The integer-type value is used for the remainder operation.

AITCE-0022

Specify an integer value between '-2147483648' and '2147483647'.

Cause
An integer value out of the allowable range is specified.
Action
Specify an integer value between -2,147,483,648 and 2,147,483,647.
Example
Example of invalid specification:

DEFINE
{
  const integer OK_END = 21474836476;   // Value exceeds the maximum.
}

The OK_END variable is assigned an integer-type value greater than the maximum.
Example of valid specification:

DEFINE
{
  const integer OK_END =214748364;      // Value is within the
                                        // allowable range.
}

The OK_END variable has been assigned an integer-type value within the allowable range.

AITCE-0023

Specify a float value between '3.402823466e+38' and '1.175494351e-38'.

Cause
A float value out of the allowable range is specified.
Action
Specify a float value between 3.402823466e+38 and 1.175494351e-38.
Example
Example of invalid specification:

DEFINE
{
  const float NG_END = 3.402823466e+40;  // Value exceeds the maximum.
}

The NG_END variable is assigned a float-type value greater than the maximum.
Example of valid specification:

DEFINE
{
  const float NG_END = 3.402823466e+10;    // Value is within the
                                           // allowable range.
}

The NG_END variable has been assigned a float-type value within the allowable range.

AITCE-0024

The data type for a switch expression is invalid.

Cause
The data type of a case label value does not match the data type of the switch statement. For example, if a switch statement of type integer contains a case label whose value is the float type, this message is displayed.
Action
Use the same data type for the switch statement and the case label values.
Example
Example of invalid specification:

DEFINE
{
  const string FileVersion = "7.1";
  integer sloop_max = 0;
}
MAIN
{
  switch (FileVersion)   // The switch statement is the string type.
      case 7.1:      // The case label is assigned an integer value.
        ...
        ...
        break;
     default:
        ...
        ...
        break;
  endswitch;
}

Although the switch statement is the string type, the case value is the integer type.
Example of valid specification:

DEFINE
{
  const string FileVersion = "7.1";
  integer sloop_max = 0;
}
MAIN
{
  switch (FileVersion)
     case "7.1":    // A value of the string type is specified.
        ...
        ...
        break;
     default:
        ...
        ...
        break;
  endswitch;
}

The case label has been assigned a string-type value to match the data type with that of the switch statement.

AITCE-0025

Unexpected EOF found in comment.

Cause
There is a comment that begins with /* but the comment end symbol (*/) is not found until the end of the file.
Action
Specify */ to close the comment before the end of the file.
Example
Example of invalid specification:

DEFINE
{
  /* Data type used in  the AIT file   // The comment is not closed.
  const integer NG_END = -1
  const integer sloop_max = 30;
}

All comments must be closed. In this example, the comment is started with /*, but is not ended with */.
Example of valid specification:

DEFINE
{
  /* Data type used in the AIT file */   // The comment is ended.
  const integer NG_END = -1;
  const integer sloop_max = 30;
}

The comment is ended with */.

AITCE-0026

A character is unknown: hexadecimal-character-code.

Cause
A character not defined in AIT language specifications exists. The hexadecimal character code is displayed.
Action
Specify only valid characters covered in AIT language specifications.
Example
Example of invalid specification:

DEFINE
{
  const integer OK_END = 0;
  const integer NG_END = -1;
  const integer sloop_max = #30;      // Invalid character "#" exists.
}

Although an invalid string like #$@ cannot be used in a string constant, variable sloop_max contains #.
Example of valid specification:

DEFINE
{
  const integer OK_END =0;
  const integer NG_END = -1;
  const integer sloop_max = 30;    // Invalid character "#" is deleted.
}

# has been deleted from the sloop_max variable.

AITCE-0027

The use of the void data type in the expression is invalid. Use a valid datatype.

Cause
An expression includes a function that returns a void-type value.
Action
In expressions, do not use any functions that return a void-type value.

AITCE-0029

Case value value already used.

Cause
The same case value is used twice or more times in a switch statement.
Action
Specify a unique case label value.
Example
Example of invalid specification:

DEFINE
{
  const string FileVersion = "7.1";
  string stMsgText;
}  
MAIN
{
  switch(FileVersion )
     case "7.1":
        ...
        ...
        break;
     case "7.1":      // Value "7.1" has already been used.
        ...
        ...
        break;
     default:
        ...
        ...
        break;
  endswitch;
}

The case labels of switch statements must have unique values.
In this example, 7.1 is used as the value of the second case label but is also used as the value of the first case label.
Example of valid specification:

DEFINE
{
  const string FileVersion = "7.1";
  string stMsgText;
}
MAIN
{
  switch(FileVersion )
     case "7.1":      // Duplicate case value "7.1" has been deleted.
        ...
        ...
        break;
     default:
        ...
        ...
        break;
  endswitch;
}

The second case label has been deleted.

AITCE-0030

function name : A function name is invalid.

Cause
An invalid function name (not found in the list of available API functions) is specified.
Action
Specify a valid function name in the AIT file. For details about valid functions (API names), see 4.1 API functions.
Example
Example of invalid specification:

DEFINE
{
  const string ExeVersion = "7.1";
  const string FileVersion = "7.1";
  string stMsgText;
}
MAIN
{
  if (ExeVersion == FileVersion)
     if (AIT_FileExists1("#setup.exe") == 0) // AIT_FileExists1 is
                                             // not a valid API name.
        stMsgText = "Setup(English) " + InstallerName + " Not Found";
        AIT_LogMessage(stMsgText);
     endif;
  endif;
}

AIT_FileExists1() is not a valid API.
Example of valid specification:

DEFINE
{
  const string ExeVersion = "7.1";
  const string FileVersion = "7.1";
  string stMsgText;
}  
MAIN
{
  if (ExeVersion == FileVersion)
     if (AIT_FileExists("setup.exe") == 0)   // Valid API name
                                             // has been specified.
        stMsgText = "Setup(English) " + InstallerName + " Not Found";
        AIT_LogMessage(stMsgText);
     endif;
  endif;
}

AIT_FileExists() has been specified as an API name.

AITCE-0031

function name : The function does not take the number-of-specified-parameters parameter.

Cause
There is a function that has an invalid number of parameters.
Each function uses a specific set of parameters. This message is displayed if the number of parameters specified for a function does not match the valid number of parameters for the function.
Action
Specify a valid number of parameters for the function. For a list of actual parameters, see 4.2 Details about the API functions.
Example
Example of invalid specification:

DEFINE
{
  const string ExeVersion = "7.1";
  const string FileVersion = "7.1";
  string stMsgText;
}  
MAIN
{
  if (ExeVersion == FileVersion)
     if (AIT_FileExists() == 0)
     // Argument was specified for AIT_FileExists.
        stMsgText = "Setup(English) " + InstallerName + " Not Found";
        AIT_LogMessage(stMsgText);
     endif;
  endif;
}

Specify at least one parameter for AIT_FileExists(). In this example, no parameter is specified for AIT_FileExists().
Example of valid specification:

DEFINE
{
  const string ExeVersion = "7.1";
  const string FileVersion = "7.1";
  string stMsgText;
}
MAIN
{
  if (ExeVersion == FileVersion)
     if (AIT_FileExists("#setup.exe") == 0)  // A parameter has been
                                             // specified for
                                             // AIT_FileExists.
        stMsgText = "Setup(English) " + InstallerName + " Not Found";
        AIT_LogMessage(stMsgText);
     endif;
  endif;
}

A parameter has been specified for AIT_FileExists().

AITCE-0032

One or more arguments specified for the function are of invalid data type.

Cause
At least one parameter for the function has a data type that the function does not expect.
Each function has a specific set of parameters. This message is displayed if the data type of a parameter specified for a function does not match the data type of the function.
Action
Specify a valid data type for the function argument. For a list of actual arguments, see 4.2 Details about the API functions.
Example
Example of invalid specification:

DEFINE
{
  const string ExeVersion = "7.1";
  const string FileVersion = "7.1";
  string stMsgText;
}
MAIN
{
  if (ExeVersion == FileVersion )
     if (AIT_FileExists("#setup.exe") == 0)
        stMsgText = "Setup(English) " + InstallerName + " Not Found";
        AIT_LogMessage(stMsgText);
        AIT_Sleep(3);      // Integer value is specified in
                           // AIT_Sleep.
     endif;
  endif;
}

Although only a float-type parameter can be specified for AIT_Sleep(), an integer-type parameter is specified.
Example of valid specification:

DEFINE
{
  const string ExeVersion = "7.1";
  const string  FileVersion = "7.1";
  string stMsgText;
}
MAIN
{
  if (ExeVersion == Version)
     if (AIT_FileExists("#setup.exe") == 0)
        stMsgText = "Setup(English) " + InstallerName + " Not Found";
        AIT_LogMessage(stMsgText);
        AIT_Sleep(3.1);      // Data type has been changed from
                             // integer to float.
     endif;
  endif;
}

The data type of the parameter for AIT_Sleep() has been changed from integer to float.

AITCE-0034

The label label-name is undefined.

Cause
The goto statement is used with no label defined.
In the AIT file, the associated label must be defined for each goto statement.
Action
Specify associated label names for all goto statements.
Example
Example of invalid specification:

DEFINE
{
  integer sloop_max = 0;
}
MAIN
{
  goto ErrorLabel; // Label ErrorLabel is undefined.
  sloop_max = 0;
}

An associated label statement must be specified for the goto statement.
In this example, only goto ErrorLabel is specified. The label ErrorLabel is not defined in the MAIN section.
Example of valid specification:

DEFINE
{
  integer sloop_max = 0;
}
MAIN
{
  goto ErrorLabel;
  sloop_max = 0;
ErrorLabel:      // The label has been defined.
}

The label ErrorLabel has been specified for the goto statement.

AITCE-0037

The label label-name for the goto statement is in a different block.

Cause
The specified label name and the associated goto statement exist in different sections.
A goto statement and the associated label must exist in the same section.
Action
Specify a label name and the associated goto statement in the same section.
Example
Example of invalid specification:

DEFINE
{
  string stMsgText;
}
MAIN
{
  goto ErrorLabel;      // goto statement is defined in MAIN section.
}
ERROR
{
ErrorLabel:      // Label is defined in ERROR section.
     stMsgText = "Setup(English) " + InstallerName + " Not Found";
}

A label and the associated goto statement must be defined in the same section. In this example, the goto statement is in the MAIN section, while the label ErrorLabel is in the ERROR section.
Example of valid specification:

DEFINE
{
  string stMsgText;
}
MAIN
{
     goto ErrorLabel;
ErrorLabel:      // The label is defined in the MAIN section.
     stMsgText = "Setup(English) " + InstallerName + " Not Found";
}

The label ErrorLabel and the associated goto statement have been defined in the MAIN section.

AITCE-0038

The value assigned to the variable is of an invalid data type.

Cause
The value assigned to a variable has an invalid data type. For example, this message is displayed if a string value has been assigned to an integer-type variable.
Action
Specify a value of a valid data type.
Example
Example of invalid specification:

DEFINE
{
  const integer OK_END =0;
  const integer NG_END = -1;
  const integer sloop_max = "30";   // A string value is assigned
                                    // to an integer-type variable.
}

In this example, a string-type constant is assigned to the sloop_max variable of type integer constant.
Example of valid specification:

DEFINE
{
  const integer OK_END =0;
  const integer NG_END = -1;
  const integer sloop_max = 30;      // integer value, not a string
                                     // value has been assigned.
}

The string constant has been deleted, and the sloop_max variable of type integer has been assigned.

AITCE-0039

An invalid 'break' statement was found.

Cause
A break statement is used in a statement other than the do-while, while-loop, for-next, or switch statement. The break statement is valid only in the loop structure.
Action
Use the break statement in the do-while, while-loop, for-next, or switch statement.
Example
Example of invalid specification:

DEFINE
{
  const string ExeVersion = "7.1";
  const string FileVersion = "7.1";
  string stMsgText;
}
MAIN
{
  if (ExeVersion == FileVersion )
     if (AIT_FileExists("#setup.exe") == 0)
        stMsgText = "Setup(English) " + InstallerName + " Not Found";
        AIT_LogMessage(stMsgText);      
        break;      // The break statement is in the if statement.
     endif;
  endif;
}

In this example, the break statement is in the if structure.
Example of valid specification:

DEFINE
{
  const string ExeVersion = "7.1";
  const string  FileVersion = "7.1";
  string stMsgText;
}
MAIN
{
  if (ExeVersion == FileVersion)
     if (AIT_FileExists("#setup.exe") == 0)
        stMsgText = "Setup(English) " + InstallerName + " Not Found";
        AIT_LogMessage(stMsgText);
     endif;
  endif;
}

The break statement has been deleted from the if structure.

AITCE-0040

An invalid 'continue' statement was found.

Cause
A continue statement is used in a statement other than do-while, while-loop, or for-next statement. The continue statement is valid only in the loop structure.
Action
Use the continue statement only in the do-while, while-loop, or for-next statement.
Example
Example of invalid specification:

DEFINE
{
  const string ExeVersion = "7.1";
  const string FileVersion = "7.1";
  string stMsgText;
}
MAIN
{
  if (ExeVersion == FileVersion)
     if (AIT_FileExists("#setup.exe") == 0)
        stMsgText = "Setup(English) " + InstallerName + " Not Found";
        AIT_LogMessage(stMsgText);
        continue;      // The continue statement is in the if statement.
     endif;
  endif;
}

In this example, the continue statement is in the if structure.
Example of valid specification:

DEFINE
{
  const string ExeVersion = "7.1";
  const string  FileVersion = "7.1";
  string stMsgText;
}
MAIN
{
  if (ExeVersion == FileVersion)
     if (AIT_FileExists("#setup.exe") == 0)
        stMsgText = "Setup(English) " + InstallerName + " Not Found";
        AIT_LogMessage(stMsgText);
     endif;
  endif;
}

The continue statement has been deleted from the if structure.

AITCE-0041

loop-structure cannot have more than 255 break statements.

Cause
The loop structure contains more than 255 break statements. The loop structure (do-while, while, for-next, or switch structure) can contain up to 255 break statements.
Action
Reduce the number of break statements in the loop structure to 255 or fewer.

AITCE-0042

loop-structure cannot have more than 255 continue statements.

Cause
The loop structure contains more than 255 continue statements. The loop structure (do-while, while, or for-next) can use up to 255 continue statements.
Action
Reduce the number of continue statements in the loop structure to 255 or fewer.

AITCE-0043

The 'switch' statement cannot have more than 255 case labels.

Cause
The switch statement contains more than 255 case labels. The switch statement can use up to 255 case labels.
Action
Reduce the number of case labels in the switch statement to 255 or fewer.

AITCE-0044

The 'switch' statement cannot have more than one default label.

Cause
The switch statement can use only one default statement.
Action
Specify only one default statement in the switch statement.
Example
Example of invalid specification:

DEFINE
{
  const string FileVersion = "7.1";
  string stMsgText;
}
MAIN
{
  switch(FileVersion )
     case "7.1":
        ...
        ...
        break;
     default:      // First default statement
        ...
        ...
        break;
     default:      // Two default statements are specified.
        ...
        ...
        break;
  endswitch;
}

Only one default statement can be specified in the switch statement. In this example, the switch statement contains two specified default statements.
Example of valid specification:

DEFINE
{
  const string FileVersion = "7.1";
  string stMsgText;
}
MAIN
{
  switch(FileVersion)
     case "7.1":
        ...
        ...
        break;
     default:      // Only one default statement is specified.
        ...
        ...
        break;
  endswitch;
}

One default statement has been deleted from the switch statement.

AITCE-0045

A required field field-name is missing in the Package Info block.

Cause
One of the fields which must be specified in the PACKAGE_INFO section is missing.
Action
Specify all the fields required in the PACKAGE_INFO section.
Example
Example of invalid specification:

PACKAGE_INFO
{
  // The package ID that must be specified is missing.
  Product = "Adobe Reader 6.0";
  Version = "0060";
  InstallerName = "AdbeRdr60_enu_full.exe";
  InstallDrive = "C:";
  InstallDirectory = "'Program Files'\Adobe'\Acrobat 6.0";
}

The package ID that must be specified is missing.
Example of valid specification:

PACKAGE_INFO
{
  PackageID = "ADOBEACROBATREADER";   // The required package item
                                      // has been specified.
  Product = "Adobe Reader 6.0";
  Version = "0060";
  InstallerName = "AdbeRdr60_enu_full.exe";
  InstallDrive = "C:";
  InstallDirectory = "'Program Files'\Adobe'\Acrobat 6.0";
}

The package ID has added in the PACKAGE_INFO section.

AITCE-0046

Unary operators '+', '-' and '!' cannot be used with a string constant.

Cause
A unary operator is specified together with a string constant.
Action
Do not specify a unary operator together with a string constant.
Example
Example of invalid specification:

DEFINE
{
  const integer OK_END =0;
  const integer NG_END = -1;
  const string szMsgText = !"30";  // "!" is used together with a
                                   // string constant.
}

A unary operator (+, -, or !) cannot be used to initialize a string-type constant in the DEFINE section.
In this example, ! is used together with a string-type constant in the szMsgText variable.
Example of valid specification:

DEFINE
{
  const integer OK_END =0;
  const integer NG_END = -1;
  const string szMsgText = "30";      // "!" has been deleted.
}

! has been deleted from the szMsgText variable.

AITCE-0047

The use of labels is invalid in an expression.

Cause
A label is used in the expression.
Action
Do not use a label in the expression.
Example
Example of invalid specification:

DEFINE
{
  integer sloop_max = 0;
}
MAIN
{
ErrorLabel:
  if (ErrorLabel)      // The label is used in the if structure.
     AIT_LogMessage("Setup(English)For Windows-Start");
     if (AIT_FileExists("#setup.exe") == 0)
        goto ErrorLabel;
        sloop_max = 0;
     endif;
  endif;
}

A label cannot be used in the expression. In this example, the label ErrorLabel is used in the if structure.
Example of valid specification:

DEFINE
{
  integer sloop_max = 0;
  string stMsgText;
}
MAIN
{
  if(1)      // The label has been deleted from the expression.
     if (AIT_FileExists("#setup.exe") == 0)
        goto ErrorLabel;
        sloop_max = 0;
     endif;
ErrorLabel:
     stMsgText = "Setup(English) " + InstallerName + " Not Found";
     AIT_LogMessage(stMsgText);
  endif;
}

The label ErrorLabel has been deleted from the if structure to validate the value in the expression.

AITCE-0048

The "!" operator is not allowed in case statements.

Cause
An expression is specified in a case label. Only constant values can be specified in the case labels of switch statements.
Action
Do not specify an expression in a case label.
Example
Example of invalid specification:

DEFINE
{
  const integer FileVersion = 7;
  string stMsgText;
}
MAIN
{
  switch (FileVersion)
     case 7:
        ...
        ...
        break;
     case 5 + 1:      // Expression cannot be used in a case label.
        ...
        ...
        break;
     default:
        ...
        ...
        break;
  endswitch;
}

Only a constant can be used in the switch statement. In this example, the second case label is assigned an additive expression.
Example of valid specification:

DEFINE
{
  const integer FileVersion = 7;
  string stMsgText;
}
MAIN
{
  switch (FileVersion)
     case 7:
        ...
        ...
        break;
     case 6:      // The expression has been deleted, and a constant
                  // is specified, instead.
        :
        :
        break;
     default:
        :
        :
        break;
  endswitch;
}

The additive expression has been deleted from the second case statement, and a constant is specified, instead.

AITCE-0050

The AIT file version is higher than the DLL version of the execution engine.

Cause
The AIT file version may be higher than the DLL version of the execution engine.
Action
Before executing an AIT file, check whether the DLL version of the script engine is higher than ScriptFileVersion indicated in the PACKAGE_INFO section. ScriptFileVersion must be lower than the DLL version.

AITCW-0016

Conversion from higher-ranking-data-type to lower-ranking-data-type: Possible loss of accuracy

Cause
If you attempt to assign a lower-ranking data type a higher-ranking data type in the AIT file, the value is rounded down, being assigned to the lower-ranking data type. For example, this message is displayed if a float-type variable has been assigned to an integer-type variable.
Action
Use a higher-ranking data type.
Example
Example of invalid specification:

DEFINE
{
  const integer OK_END = 0;
  const integer SLEEP_TIME = 3.8;      // An attempt has been made to assign the integer variable the float-type variable. The value is rounded down, with only 3 saves in the variable.
}

In this example, a float-type value is assigned to the SLEEP_TIME variable of type integer. The assigned value is rounded down, with only the integer-type value saved in the SLEEP_TIME variable.
Example of valid specification:

DEFINE
{
  const integer OK_END =0;
  const float SLEEP_TIME = 3.8;      // The variable type has been changed to the float type.
}

The data type of the SLEEP_TIME variable has been changed from integer to float to hold a float-type value.

AITCW-0017

Unsafe use of boolean variable for processing.

Cause
If you have specified a bool-type variable in an unexpected way, this warning message is displayed. For example, if you have specified a bool-type variable for a divisional or remainder operation (/ or %), this leads to division by 0 or 0/0 contradiction, and this warning message will be displayed.
Action
In such a case, do not specify any variables of type bool.
Example
Example of invalid specification:

DEFINE
{
  const integer sloop_max = 30;
  integer sloop_count;
  bool IsPathSet = false;
}
MAIN
{
  sloop_count = sloop_max / IsPathSet;      // The Boolean variable is specified as the divisor.
}

If a bool-type variable has been used, this leads to a division by 0, and this warning message will be displayed. In this example, the IsPathSet variable of type bool is specified as the divisor, leading to a division by 0.
Example of valid specification:

DEFINE
{
  integer NG_END = 1;
  const integer sloop_max = 30;
  integer sloop_count;
}
MAIN
{
  sloop_count = sloop_max / NG_END;     // The Boolean variable has been deleted, and the integer-type variable has been specified as the divisor.
}

The IsPathSet variable of type bool has been deleted, and the NG_END variable of type integer has been specified as the divisor.

AITCW-0028

Unsafe mix of type data-type-1 and type data-type-2 in operation operator.

Cause
A mixture of integer and bool types is specified in such as bitwise logical AND and OR operations.
Action
For the indicated operand, make sure that the data types of the expressions are consistent.
Example
Example of invalid specification:

DEFINE
{
  integer sloop_max = 0;
  bool IsPathSet;
}
MAIN
{
  sloop_max = sloop_max & IsPathSet;      // The integer and bool types are specified for bit logical AND.
}

In this example, the integer and bool types are specified for the AND operation, with data types mixed.
Example of valid specification:

DEFINE
{
  integer sloop_max = 0;
  integer sloop_count;
}
MAIN
{
  sloop_max = sloop_max & sloop_count;      // Integer types have been specified for bit logical AND.
}

The operands of the & operator have the same data type integer.

AITCW-0033

Switch statement contains only default label.

Cause
The switch statement contains only a default case label, and contains no case labels. This is equivalent to a statement sequence error.
Action
Specify at least one case label in the switch statement.
Example
Example of invalid specification:

DEFINE
{
  const string FileVersion = "7.1";
  string stMsgText;
}
MAIN
{
  switch(FileVersion)
     default:      // Only the default label is used in the switch statement.
        :
        :
        break;
  endswitch;
}

All switch statements require at least one case label. In this example, however, the case statement does not exist, with only the default statement specified.
Example of valid specification:

DEFINE
{
  const string FileVersion = "7.1";
  string stMsgText;
}
MAIN
{
  switch(Version )
     case "7.1":      // The switch statement contains the case statement.
        ...
        ...
        break;
     default:
        ...
        ...
        break;
  endswitch;
}

A case statement has been added to the switch statement.

AITCW-0035

label-name: Unreferenced label.

Cause
The indicated label has been defined but has not been referenced. It is ignored.
Action
Specify a goto statement that references the label name.
Example
Example of invalid specification:

DEFINE
{
  const string ExeVersion = "7.1";
  const string FileVersion = "7.1";
  integer sloop_max = 0;
}
MAIN
{
  if (ExeVersion == FileVersion )
ErrorLabel:   // The goto statement associated with the label does not exist.
     AIT_LogMessage("Setup(English)For Windows-Start");
     if (AIT_FileExists("#setup.exe") == 0)
        sloop_max = 0;
     endif;
  endif;
}

The label requires the associated goto statement. If you have specified a label statement with no goto statement, the label statement is ignored. In this example, label ErrorLabel is specified with no goto statement.
Example of valid specification:

DEFINE
{
  const string ExeVersion = "7.1";
  const string FileVersion = "7.1";
  integer sloop_max = 0;
}
MAIN
{
  if (ExeVersion == FileVersion)
     AIT_LogMessage("Setup(English)For Windows-Start");
     if (AIT_FileExists("#setup.exe") == 0)
        goto ErrorLabel;      // The goto statement has been specified.
        sloop_max = 0;
     endif;
ErrorLabel:      // The label is defined.
     stMsgText = "Setup(English) " + InstallerName + " Not Found";
     AIT_LogMessage(stMsgText);
  endif;
}

The goto statement associated with the label ErrorLabel has been specified.
Another means is to delete unnecessary label statements.

AITCW-0036

variable name: Unreferenced variable.

Cause
The variable defined in the DEFINE section is not referenced.
Action
Delete defines variables that are unnecessary or not used.
Example
Example of invalid specification:

DEFINE
{
  const string ExeVersion = "7.1";
  const string FileVersion = "7.1";
  integer sloop_max;      // This variable is not referenced from anywhere in the program.
  string stMsgText;
}
MAIN
{
  if (ExeVersion == FileVersion)
     AIT_LogMessage("Setup(English)For Windows-Start");
     if (AIT_FileExists("#setup.exe") == 0)
        stMsgText = "Setup(English) " + InstallerName + " Not Found";
     endif;
  endif;
}

In this example, the sloop_max variable is defined in the DEFINE section, but is not used in the MAIN section.
Example of valid specification:

DEFINE
{
  const string ExeVersion = "7.1";
  const string FileVersion = "7.1";
  integer sloop_max;
  string stMsgText;
}
MAIN
{
  if (ExeVersion == FileVersion)
     AIT_LogMessage("Setup(English)For Windows-Start");
     if (AIT_FileExists("#setup.exe") == 0)
        sloop_max = 0;// Variable sloop_max is used.
        stMsgText = "Setup(English) " + InstallerName + " Not Found";
        AIT_LogMessage(stMsgText);
     endif;
  endif;
}

The sloop_max variable is used in the MAIN section.
Another means is to delete variables unnecessary in the MAIN section from the DEFINE section.