Compiler errors overview: Difference between revisions

From Unreal Wiki, The Unreal Engine Documentation Site
Eliot (talk | contribs)
Eliot (talk | contribs)
m No need to separate engine versions, errors are the same for all engine generations with the exception of deprecated/new ones.
Line 1: Line 1:
==UE3==
{{expand}}
{{expand}}
===Errors===
==Errors==
;Error, Unexpected 'defaultproperties' : This seems to occur when you have an end of multi-comment preceded by a line comment on the same line. see [[Compiler issues]]
;Error, Unexpected 'defaultproperties' : This seems to occur when you have an end of multi-comment preceded by a line comment on the same line. see [[Compiler issues]]
;Error, 'class'<nowiki>:</nowiki> Limitor 'class name' is not a class name :
;Error, 'class'<nowiki>:</nowiki> Limitor 'class name' is not a class name :
Line 10: Line 9:
;Error, Not allowed to use '[[Variable#Modifiers_affecting_values|config]]' with object variables :
;Error, Not allowed to use '[[Variable#Modifiers_affecting_values|config]]' with object variables :
;Error, Could not load existing package file 'package path' :
;Error, Could not load existing package file 'package path' :
;Error, 'Ignores'<nowiki>:</nowiki> 'ExecuteWhatToDoNext' is not a function
;Error, 'Ignores'<nowiki>:</nowiki> 'ExecuteWhatToDoNext' is not a function :
;Error, Class 'localized' keyword is no longer required :
The class modifier '''localized''' is auto-implied so just remove it.


====Preprocessor====
===Preprocessor===
;Error, End of script encountered while attempting to parse macro parameter :
;Error, End of script encountered while attempting to parse macro parameter :


====Subobjects====
===Subobjects===
;Error, BEGIN OBJECT<nowiki>:</nowiki> Missing class in subobject/component definition<nowiki>:</nowiki> Begin Object Class='''class name''' Name='''object name''' : The class that this object is defined as {'''Begin Object Class='''} does not exist.
;Error, BEGIN OBJECT<nowiki>:</nowiki> Missing class in subobject/component definition<nowiki>:</nowiki> Begin Object Class='''class name''' Name='''object name''' : The class that this object is defined as {'''Begin Object Class='''} does not exist.
;Error, BEGIN OBJECT<nowiki>:</nowiki> name '''object name''' redefined<nowiki>:</nowiki> Begin Object Class='''class name''' Name='''object name''' : Fairly self explanatory, this ''exact'' object is defined elsewhere in script.
;Error, BEGIN OBJECT<nowiki>:</nowiki> name '''object name''' redefined<nowiki>:</nowiki> Begin Object Class='''class name''' Name='''object name''' : Fairly self explanatory, this ''exact'' object is defined elsewhere in script.


====Interfaces====
===Interfaces===
;Error, Failed to find DependsOn class 'interface name' while parsing 'class name' : the [[Classes|Implements]] modifier in the class declaration contains an incorrect interface name value.
;Error, Failed to find DependsOn class 'interface name' while parsing 'class name' : the [[Classes|Implements]] modifier in the class declaration contains an incorrect interface name value.
;Error, Implementation of function 'function name' conflicts with interface 'interface name' - different number of parameters (2/3) :
;Error, Implementation of function 'function name' conflicts with interface 'interface name' - different number of parameters (2/3) :


====Bad or missing expression====
===Bad or missing expression===
;Error, Bad or missing expression in '[[If]]' : a function in an if statement does not return a type.
;Error, Bad or missing expression in '[[If]]' : a function in an if statement does not return a type.
;Error, Bad or missing expression in Call to 'function name', parameter ''number'' :
;Error, Bad or missing expression in Call to 'function name', parameter ''number'' :
Line 31: Line 32:
;Error, '[[type]]' conversion<nowiki>:</nowiki> Bad or missing expression
;Error, '[[type]]' conversion<nowiki>:</nowiki> Bad or missing expression


====Missing====
===Missing===
;Error, Missing 'function' : declared a function modifier without a function, defined a function type before function.  
;Error, Missing 'function' : declared a function modifier without a function, defined a function type before function.  
;Error, Missing ')' in 'foreach array' : the variable inside the brackets of a foreach loop is not defined.
;Error, Missing ')' in 'foreach array' : the variable inside the brackets of a foreach loop is not defined.
Line 37: Line 38:
;Error, ImportText (''[[struct]]'')<nowiki>:</nowiki> Missing closing parenthesis<nowiki>:</nowiki>(''member1''='value',''member2='value'))
;Error, ImportText (''[[struct]]'')<nowiki>:</nowiki> Missing closing parenthesis<nowiki>:</nowiki>(''member1''='value',''member2='value'))


====Static Functions====
===Static Functions===
;Error, Can't call instance functions from within static functions : [[Static Function|Static functions]] can only call other static functions.
;Error, Can't call instance functions from within static functions : [[Static Function|Static functions]] can only call other static functions.
;Error, You can only access default values of variables here : tried to assign a non [[default variable]] a value, using a non [[default variable]] in a statement, assigning a variable a value from another that is not a default variable. There are instances where you can access non default variables in [[Static Function|Static functions]], if the variable is part of the function definition, a local variable.
;Error, You can only access default values of variables here : tried to assign a non [[default variable]] a value, using a non [[default variable]] in a statement, assigning a variable a value from another that is not a default variable. There are instances where you can access non default variables in [[Static Function|Static functions]], if the variable is part of the function definition, a local variable.


====Mismatch====
===Mismatch===
;Error, Type mismatch in Call to 'function name', parameter ''number'' : the [[type]] of [[variable]] being passed to the function parameter number specified is incorrect.
;Error, Type mismatch in Call to 'function name', parameter ''number'' : the [[type]] of [[variable]] being passed to the function parameter number specified is incorrect.
;Error, Type mismatch in '=' :
;Error, Type mismatch in '=' :


===Warnings===
==Warnings==
;Warning, Function parameter: 'function name' conflicts with previously defined field in 'class name'
;Warning, Function parameter: 'function name' conflicts with previously defined field in 'class name'
;Warning, 'variable name' <nowiki>:</nowiki> local variable used before assigned a value : a variable is referenced before it is assigned a value, which means it'll return the default value for that type, whether that is what you are looking for or not. This could be conditionally incorrect, the compiler doesnt check to see in which order things are carried out so it could infact be wrong, hence only a warning.
;Warning, 'variable name' <nowiki>:</nowiki> local variable used before assigned a value : a variable is referenced before it is assigned a value, which means it'll return the default value for that type, whether that is what you are looking for or not. This could be conditionally incorrect, the compiler doesnt check to see in which order things are carried out so it could infact be wrong, hence only a warning.
Line 58: Line 59:
;Warning, '''friendly operator name'''_'''TypeNameTypeName'''<nowiki>:</nowiki> Missing return value : This is similar to function not having a return value but is the operator version, UScript supports operator overloading so the 'friendly operator name''' will be a reference to a table within the engine $ being Concat as an example.
;Warning, '''friendly operator name'''_'''TypeNameTypeName'''<nowiki>:</nowiki> Missing return value : This is similar to function not having a return value but is the operator version, UScript supports operator overloading so the 'friendly operator name''' will be a reference to a table within the engine $ being Concat as an example.


===Failure===
==Failure==
;Failed to load 'object package.group.name'<nowiki>:</nowiki> Failed to find object 'object package.group.name'
;Failed to load 'object package.group.name'<nowiki>:</nowiki> Failed to find object 'object package.group.name'

Revision as of 15:49, 19 May 2010

Errors

Error, Unexpected 'defaultproperties'
This seems to occur when you have an end of multi-comment preceded by a line comment on the same line. see Compiler issues
Error, 'class': Limitor 'class name' is not a class name
Error, Calling a singular function within a singular function on the same object will always fail
Error, Classes with config/ globalconfig member variables need to specify config file.
Error, Cast from 'class' to 'class' will always fail
Error, Invalid property or function call on a dynamic array
Error, Not allowed to use 'config' with object variables
Error, Could not load existing package file 'package path'
Error, 'Ignores': 'ExecuteWhatToDoNext' is not a function
Error, Class 'localized' keyword is no longer required

The class modifier localized is auto-implied so just remove it.

Preprocessor

Error, End of script encountered while attempting to parse macro parameter

Subobjects

Error, BEGIN OBJECT: Missing class in subobject/component definition: Begin Object Class=class name Name=object name
The class that this object is defined as {Begin Object Class=} does not exist.
Error, BEGIN OBJECT: name object name redefined: Begin Object Class=class name Name=object name
Fairly self explanatory, this exact object is defined elsewhere in script.

Interfaces

Error, Failed to find DependsOn class 'interface name' while parsing 'class name'
the Implements modifier in the class declaration contains an incorrect interface name value.
Error, Implementation of function 'function name' conflicts with interface 'interface name' - different number of parameters (2/3)

Bad or missing expression

Error, Bad or missing expression in 'If'
a function in an if statement does not return a type.
Error, Bad or missing expression in Call to 'function name', parameter number
Error, Bad or missing expression for token: function, in 'Return'
Error, Bad or missing expression for token: variable, in 'If'
to note in this case the variable was an actor reference.
Error, Bad or missing expression after '+': 'variable name'
+ being an incorrect operator usage?
Error, 'type' conversion: Bad or missing expression

Missing

Error, Missing 'function'
declared a function modifier without a function, defined a function type before function.
Error, Missing ')' in 'foreach array'
the variable inside the brackets of a foreach loop is not defined.
Error, Missing ';' before 'variable name'
the variable you are trying to access through a typecast is not defined.
Error, ImportText (struct): Missing closing parenthesis:(member1='value',member2='value'))

Static Functions

Error, Can't call instance functions from within static functions
Static functions can only call other static functions.
Error, You can only access default values of variables here
tried to assign a non default variable a value, using a non default variable in a statement, assigning a variable a value from another that is not a default variable. There are instances where you can access non default variables in Static functions, if the variable is part of the function definition, a local variable.

Mismatch

Error, Type mismatch in Call to 'function name', parameter number
the type of variable being passed to the function parameter number specified is incorrect.
Error, Type mismatch in '='

Warnings

Warning, Function parameter
'function name' conflicts with previously defined field in 'class name'
Warning, 'variable name' : local variable used before assigned a value
a variable is referenced before it is assigned a value, which means it'll return the default value for that type, whether that is what you are looking for or not. This could be conditionally incorrect, the compiler doesnt check to see in which order things are carried out so it could infact be wrong, hence only a warning.
Warning, 'variable name' : unreferenced local variable
a variable is declared within a function and never assigned a value.
Warning, Unresolved reference to Class 'class name'
Warning, function: Missing return value
a function with a return type has no 'return'.
Warning, ObjectProperty Engine.MeshComponent:Materials.Materials: unresolved reference to 'object'package.group.object
Warning, Invalid property value in defaults: property=value
a property in the defaults is not a defined variable.
Warning, Using a non-qualified name (would have) found: object package.group.group.name
Warning, Unable to parse parameter value in defaultproperties array operation: array<struct>.add((member1='value',member2='value'))
Warning, Unresolved reference to object
Warning, friendly operator name_TypeNameTypeName: Missing return value
This is similar to function not having a return value but is the operator version, UScript supports operator overloading so the 'friendly operator name will be a reference to a table within the engine $ being Concat as an example.

Failure

Failed to load 'object package.group.name': Failed to find object 'object package.group.name'