TScript API Error Codes

It is far easier to get the system information to findout what caused the error, and only use the error number for error handling. See the example code:-

  • C++
#include "TScript.h"

int wmain(int argc, wchar_t* argv[])
{
   unsigned int result;
   const char16_t *string;
   CTScript ts;
   if((result = ts.ExecuteStaticMethod()) != NO_ERROR){
      ts.GetParameter(CTScript::LAST_ERROR,NULL,&string);
      MessageBox((wchar_t*)string,
         TEXT("TScript Runtime Error Message"),
         MB_ICONERROR);
   }
   return NO_ERROR;
}

For more information on the above code, please see GetParameter

Find Error Value:

NameValueDescription
NO_ERROR0No Error, method call executed correctly.
ALREADY_DEFINED1Use of named constant "X" in file Y. Has already been defined in a different context.
ALREADY_DEFINED_VARIABLE2Variable Name has already been defined "X".
NOT_ENOUGH_MEMORY8The system was not able to allocate the require memory for the operation to complete
NOT_DEFINED_ID_METHOD16Call to undefined id method
NOT_DEFINED_STATIC_METHOD17Call to undefined static method:- X
NOT_DEFINED_NAMED_METHOD18Call to undefined named method:- X
NOT_DEFINED_NAMED_CONSTANT19Use of undefined named constant X, resourceID = Y
NOT_DEFINED_NAMED_PARAMETER27Call to undefined named method, please double check parameter types
UNKNOWN_RESOURCE20Use of unknown resource
UNKNOWN_CSTATEMENT21Call to undefined C statement X
UNKNOWN_DEFINE_VARIABLE22Call to unknown defined variable
UNKNOWN_NAMED_METHOD23Attempting to use undefined named method X
MISSING_VALUE24Missing paramater value at:- X. Found in file - Y, line = A, char = B.
MISSING_LEFT_VALUE25Missing left hand side paramater value for:- X. Found in file - Y, line = A, char = B.
MISSING_RIGHT_VALUE26Missing right hand side paramater value for:- X. Found in file - Y, line = A, char = B.
ILLEGAL_TOKEN30Illegal Token "X". Found in file - Y, line = A, char = B
ILLEGAL_METHOD_SYNTAX31Illegal method syntax "X". Found in file - Y, line = A, char = B.
ILLEGAL_PROPERTY32Illegal property syntax "X". Only a method that returns one and only one parameter my be used as a property. Found in file - Y, line = A, char = B.
INVALID_PERMISSION33Invalid permission to access "X".
INVALID_DIRECTORY34Not in use
INVALID_PARAMETER35Invaild parameter given to windows API functon:- X.
NO_MATCHING_BRACE36Syntax error, unable to find matching brace for "X". Found in file - Y, line = A, row = B.
INCOMPLETE_OPERATOR37Operator is incomplete "X". Found in file - X, line = A, char = B.
INCORRECT_VERSION38Incorrect version request X. Found in file - Y, line = A, char = B.
LIBRARY_NOT_AVAILABLE39Unable to link to required library in order to complete operation.
LIBRARY_SYMBOL_NOT_FOUND40Unable to link to library symbol X in order to complete operation.
NULL_REFERENCE41Null Reference encountered - unable to assign value to null variable.
INTERNAL_ERROR42Unknown Texas Script error code X. String1 = X. String2 = Y. Integer1 = A, Integer2 = B
UNWRITEABLE_TVARIABLE43Declared TVariable is required for result - "X". Found in file - Y, line = A, char = B.
TOO_MANY_PARAMETERS44Too many parameters for method call "X". Found in file - Y, line = A, char = B.