Always snap to grid

Legacy:Compiler Errors

From Unreal Wiki, The Unreal Engine Documentation Site
Jump to: navigation, search

The warnings and errors described on this page are generated only by the compiler. If you need information about logged in-game warnings see Log Warnings.

The Ucc Make commandlet outputs warning and critical error messages in the form

<path and filename>(line number) : error message

Usually the problem can be found by opening the specified file and looking at the specified line number. Exceptions are missing declarations or braces further up in the file or missing declarations in a superclass (if it's part of your code). The Wiki recommends the UMake compiling tool :D.

Warnings[edit]

Warning, 'name' obscures 'name' defined in base class 
You declared a class variable, struct or enum with the same name as a class variable, struct or enum of a superclass. This will obscure the object in the superclass so you can't access it in the code of your class anymore.
In UT2004 this warning also applies to local function variables which obscure class variables in the same class or one of its superclasses.

Foxpaw: Could you get around this by simply using Self.? IE, if variable A was obscured by local variable A, you should be able to access local A with A, and global A with Self.A. Seems like it would work.

Wormbo: Of course you could, but the warning is there because the usual way to access the class varaible is blocked. It's easier to find the problem with this warning when you access the obscuring variable instead of the obscured one in you code.

Warning, 'variable name' - unreferenced local variable 
A function declares a local variable but doesn't use it beyond that – you may as well remove it if Wiki:YouArentGonnaNeedIt
Warning, function name - Missing return value 
The function is declared as returning a value, but there's no return statement in the function. The default value of that variable type will be returned (e.g. false, 0, "", None; also see Variable Syntax)
ExecWarning, Reference to deprecated property 'variable name
You are using a variable marked as deprecated in your code.
Warning, Class names shouldn't end in a digit
This warning appears harmless enough. Classes with names ending in a digit (IE BloodFX2) seem to work fine.
Warning, Missing Function 
You are calling a function that has not been defined.

Syntax Errors[edit]

General Structure[edit]

Bad class definition 'class name
In UT2003, the most common cause for this error is that you accidentally used "expands" instead of "extends." The old keyword "expands" is not supported anymore. (It has been considered deprecated for a long while already.)
Superclass class name of class other class name not found 
The superclass of one of your classes couldn't be found. Check the class header of the second class for typos. If the superclass is in the same package also check its class header, if not check the Game Ini File's EditPackages lines for missing packages.
Unexpected end of file at end of class 
This is usually caused by one or more missing "}". This error can be quite annoying in large classes. Most of it is prevented by proper code indentation and (what experienced coders frequently do) writing both the opening and the closing brace at the same time and then filling in code between them.
Unexpected 'defaultproperties' 
The default properties block can only be used outside of UnrealEd. Within UnrealEd, they have to be set from the Actor Classes Browser interface; hidden variables (not declared to show up in any of the property groups) can have their defaults set via the UnrealEd console. Use UCC Make instead of UnrealEd to compile your classes if you want to use this feature. This error can also happen when you use a weird commenting style like:
/* some comment
  • ///===========Basically using a multi-line comment immediately followed by a single-line comment anywhere in your class breaks the parser and makes it complain about the defaultproperties keyword. Add a whitespace or linebreak or think about your commenting style in general. ;)
Unexpected '} or identifier
This is caused by one or more missing "{" or too many "}". See suggestions above.
Call to 'function': Type mismatch in parameter number 
One of the parameters in your function call doesn't have the right type and can't be automatically casted to it. Look up the original declaration of the function (in the original UnrealScript source code or here on the Wiki) and double-check against the types of the values you're actually using.
Error, Call to 'function name': bad or missing parameter 1
Due to Non-Existing Variable or Spelling mistake Example:
TriggerEvent('SomethingWrongHere', Self, Instigator)
Error, Call to 'function name': Bad ',' or missing ')' 
This error is reported if you attempt to call a function with more parameters than it was declared with. In other words, there should be no comma where the compiler found it, maybe the call is simply missing a right parenthesis there. For example the global function Atan was defined with only one parameter in UT1, but with two parameters in later engine generations.
Internal fixup error 0 
This error occurs when using break in an if statement inside a case block.
'Else': Bad command or expression 
Make sure there is an If right before the mentioned else. If that If block executes more that one line of code, make sure the block is enclosed in braces. See Flow Syntax.
Error, Bad or missing expression in '(some expression)'
Check whatever comes after the expression mentioned in the message. For example, a "Bad or missing expression in 'If'" could mean the condition does not evaluate to a boolean value (True or False), and generally you might have mistyped the function or variable name.
Error, Right type is incompatable with "$"
Usually when you have only specified the name of an array and not the variable contained inside.
Error, Missing '(' in 'if' 
Usually due to wrong operator eg. using If(a=b) instead of if(a==B).
Error,Missing '(' in 'struct' 
Can be caused by leaving Blank spaces in a variable name inside a struct.
'Else If' is not allowed here
'Else' is not allowed here 
Most likely you have the wrong number of braces after an If statement.
'class' is not allowed here 
Generally caused by having your class statement in the wrong place. However, I got this error as well in a switch statement by putting something after default, like so:
switch( CameraMode )
{
  case CAM_FocusFollowLOS:
//  ... lots of stuff skipped here
  default:
  case CAM_Still:
    break;
}
Enum is not allowed here. 
You have an enum declaration appearing after functions. Enums must be defined at the top of the class along with variables.
Bad variable or function 'name' in replication definition 
The variable or function isn't declared in this class. Check for spelling errors and make sure the specified variable or function isn't already declared in a superclass.
Error, 'class': Limitor 'name' is not a class name 
The class name in class<class name> does not point to an existing class. Make sure that the specified class is ed at the time the script is compiled.
Can't find Class 'class name
This error can also occur for Textures, Sounds, Meshes, etc. Make sure the specified class is ed at compile time by either adding its package to the EditPackages above your package's entry or using an #exec OBJ LOAD line.
Package1.ClassName's superclass must be Package1.SuperClassName, not Package2.SuperClassName 
I got this weird error message when compiling two packages with similar class structures. Package1 contained a class ClassName with the superclass SuperClassName (both in Package1) and Package2 contained the same classes. Package2 was compiled before Package1 and the error occured during parsing of ClassName in Package1.
Always change the class names when copying them from one project to another. It's fine as long as you compile them seperately, but as soon as you need both of them problems like this start occuring.

j3rky: This error message also appears if you changed the ancestor class of native actors and objects (e.g. class A extends B changed to class A extends C), without having rebuilt the native DLL. In that case, the native DLL still references the old class B while the script compiler is trying to bind to the new class C. Fix this by deleting the old DLL, or by running ucc make with the -nobind option. Rebuild the DLL with the new generated header file.
Unterminated string constant 
This error occurs, when the closing double quotation marks for a string are missing. Note that while strings may contain line breaks, they may not span several lines in your code. Use the Chr function to generate the line break characters if you need them.

fataoverdoseYou can also get this error if you put one to many double quotation marks in the string.

BEGIN OBJECT: name objectname redefined. 
This error occures if two or more objects declared in the default properties of the same class have the same name. The objects must have unique names.
redundant data: defaultproperty declaration 
You get this error when you redefine the default value of a property in the same class, like:
defaultproperties

{

 somearray(0)="this will be reported by the compiler"
 somearray(0)="this won't be reported"

}

Foxpaw: I accidentally did something similar, but the second variable was reported, not the first. However, since the variable in your example is an array, it may be treated differently. My code was (trimmed down a bit):

defaultproperties
{
  Skins(0)=Texture'PlayerSkins.JuggMaleABodyA'
  Skins(1)=Texture'PlayerSkins.JuggMaleAHeadA'
  CollisionRadius=+00050.000000
  CollisionHeight=+00050.000000
 
  CollisionRadius=+00034.000000
  CollisionHeight=+00078.000000
}

In this code it reported that the 34 and 78 were the redundant data.

Missing '(' in 'Remove(...)' 
A dynamic array's Remove method expects the index of the first element and the number of elements to be removed in parentheses, like "Remove(2,4)".

}

Missing "(" in editable member variable
Don't put anything in the parentheses next to a variable name when defining a struct ie.
struct mystruct
{
Var(myvalues) float ValueA;
Var(myvalues) float ValueB;
}

This will work;

struct mystruct
{
Var() float ValueA;
Var() float ValueB;
}
Error, ArrayCount argument is not an array 
The syntax ArrayCount(arrayname) only applies to static arrays. Use arrayname.Length for dynamic arrays instead.
Map are not supported in UnrealScript yet 
You felt like experimenting, huh? :) The map variable type isn't supported in UnrealScript.
General protection fault!, ScriptCompiler::CompileSecondPass 
There's actually quite a string that acoompanies this, but this part should signal you that this is what you've got. You did something that the compiler can't handle but Epic never imagined you'd try. I got this error from trying to use an unconditional replication. I wanted this function to be replicated to the other party regardless of which machine it originated on, so I tried: reliable AddAction,RemoveAction; This will generate the above error. You MUST use the if part of the replication statement even if it will always be true. There isn't any way to know exactly what is causing this error in your code, but by looking at the ucc.log, you can at least determine which class the unexpected error was encountered (it will be the last class listed prior to the stack trace).
Another way to get the GFP failt is using [dependsOn] with a class that doesn't exists.

Functions[edit]

Redefinition of 'function name' differs from original 
When overriding functions you are not allowed to change the return type, the number or type of parameters or some of the function modifiers, e.g. static functions must stay static, public functions can't become protected. (E.g. simulated or native functions can become non-simulated or non-native in subclasses though, because those keywords only apply to the actual implementation in that single class.)
Functions can't be over ed in UnrealScript.
'function name': too many parameters 
In UnrealScript functions can have a maximum of 16 parameters. If you need more parameters you will have to put them in a struct or array and pass that to the function.
Function 'function name' specifiers differ from original 
This error occurs when you try to override a final function or try to override a public function with a protected or private one or a protected function with a private or public one. (see Function Syntax)
'identifier' conflicts with 'other identifier
You can have only one function of the same name within the same state of a class, and you can't have variables and functions with the same name in the same class at all. Rename or remove one of the conflicting identifiers.
Can't call instance functions from within static functions 
Static functions can only call other static functions. Check if your function really needs to be static or whether you forgot to declare the other function as static.
You can also get this error when trying to call a non-static function via the class'SomeClass'.static.FunctionName() syntax.
Bad preoperator definition
Your declaration of a preoperator is invalid. This is most often caused by attempting to set a priority for a preoperator, as preoperators and postoperators do not take a priority value. See Scripting Operators for the proper declaration.
Bad postoperator definition
This is the same as "Bad preoperator definition," but for postoperators.
Unknown Function 'function name' in 'Class Package1.ClassName'
This error comes up when your code attempts to call a function that does not exist. You may have forgot the parenthesis when using the super keyword to call a function that have no parameters. This can also be caused by forgetting the cast on an object reference. Sometimes it is also caused by a misspelled function name.
Function name mismatches delegate delegate name 
You tried to assign a function to a delegate property, but the function's parameters and/or return value don't match the delegate's parameters and/or return value.
Delegate assignment failed
You tried to assign a function to a delegate property, but the function's parameters and/or return value don't match the delegate's parameters and/or return value.
Error, operator must have 2 parameters 
Binary operators must be declared with two parameters and a return value. See Scripting Operators.

Variables[edit]

Can't assign Const variables 
You are not allowed to assign class variables declared with the const modifier. (See Variable Syntax.) Instead find a native function which can set this variable. (e.g. SetDrawScale() for the DrawScale property)
Error, Missing '>' in 'class limitor' 

I got this problem with the following code:

var array<class<WeaponFire>> WFCs;

which was easily fixed by changing it to the following:

var array<class<WeaponFire> > WFCs;

Presumably, it parses ">>" as an operator and then can't find the closing ">".


Can't save class: Graph is linked to external private object object 
One of your classes is making a reference to an object in another package without the RF_Public flag set. This is not permitted in Unreal Packages. Check your class for references to private or protected variables in other classes or to other object constants. This error can also occur if you reference a protected variable in a superclass *if* your derived class resides in a different package from the class where the protected member is declared (even though this is technically supposed to work).
Enums can only be declared in class or struct scope 
Like the message says. Enums can't be declared in functions or operators.
Variable declaration: 'variable name' already defined 
You tried to declare two variables with the same name in the same function.
Expression has no effect 
Expressions like Int1 + Int2; have no effect, i.e. they don't change anything when not assigned to a variable. This error can also be caused by using an incorrect syntax for assigning values to array elements like anArray(0) = anything; (the correct syntax is anArray[0] = anything;)
')' Expression has no effect 
You could be missing the first '(' in a log command. You could also be typecasting wrong. Also, make sure a function parameter does not have the same name as a function you're calling in that function. Example:
function ThisIsWrong(int Spawn)
{
   If(Spawn == 1)
   Spawn(class'AClass');
}
Unrecognized member 'variable name' in class 'class name'
You're attempting to use a variable name that is not defined as a global variable in class class name. This usually occurs when you've typecasted a class variable, such as PlayerPawn(P) where P was defined as a Pawn. In this situation, at the line this error mentions, you've probably forgotten to typecast your P variable.
Unrecognized type 'variable type
The class, enum or struct you wanted to use is not declared or not visible from this point. Also check for typos.
Type mismatch in 'operator
The variable type you specified doesn't match the type the operatore requires and can't be automatically casted to the required type.
Type mismatch in 'If' 
Similar to the type mismatch in operator. The condition must be a boolean value, it will not be typecasted automatically. Often the use of = instead of ---- causes this error.
Array mismatch in '=' 
This error is thrown when some code attempts to copy a static array. Static arrays can be passed as function parameters but can't be copied. This implies that static arrays also can't be used as return types because they cannot be assigned to a more permanent var. Consider using a Dynamic_Array instead.
Unrecognized variable 'variable name' name in replication definition 
You tried to replicate a variable or function which was not declared in this class. Check for typos.
Bool arrays are not allowed 
Well, they are not allowed. :) Use byte arrays instead.
Can only assign individual booleans, not boolean arrays 
You tried to assign a static array to another static array. This message always says "boolean" although you can't even declare boolean arrays. ArrayOne = ArrayTwo is only allowed for dynamic arrays. Instead use a loop and assign element by element.
Variable is too large (x bytes, 255 max) 
Static arrays and large structs can only be accessed from outside the object containing them when they use less than 255 bytesx of memory. This restriction may seem weird, but you'll have to live with it. Try using a dynamic array instead of a static one, break doen the struct into several class properties or use accessor functions to work around this restriction.
Arrays within arrays not supported. 
You can't use declarations like "array< array<string> >", otherwise the compiler throws this error. You could however create a struct with an array as the only element and create an array of this struct.
ObjectProperty 'Property Name' : unresolved reference to 'Some Texture or Something
This is usually caused by having a reference to a texture or other resource that is spelled incorrectly, you forgot to create, or something similar. However, this can also have an interesting cause: If the texture/whatever package contains a resource of a type that is not in a package above this one. (IE you made a custom Material class and the package has a material of that class in it, and the code for that Material class hasn't been compiled yet) then the entire package will fail to.
This can also happen if you have multiple paths, both containing the offending package. For example: let's say you have a texture package called mytex.utx, and for some reason you put it in your mod\textures\ directory, as well as your ut200x\system directory. You then add a texture to the copy in your mod\textures\ directory, and forget to add it to the other one(sloppy, but I've done this on accident before.) And let's say that in your .ini file you have your mod\textures\ directory listed AFTER the ut200x\textures directory. Then ucc will the first version of the package, thinking that's what you meant, but won't find the new texture, and spit this error at you. The solution: always only use one version of every package. Learn how to use ini files to tell UCC where to look for packages, rather than putting a copy in your mod directory to run, and your system directory to compile.FatalOverdose-note. one spelling mistake in a parent class can cause this error for all its children. This can be very frustrating when ucc tells you there are errors in scripts that seem to be totally correct. This can also occure if you try to put "new class'name'" in the defaultproperties.
Variable declaration variable name: Bad or missing array size 
You have to specify a numeric value as the size of a static array. It seems in UT the compiler doesn't recognize constants as the array size, but this works in UT2003. Also remember that you have to specify an integer value as the array size and the largest positive integer number UnrealScript knows is 2147483647. (Use the constant MaxInt if you can't remember this value, but why the heck would you create a static array this large?)

Foxpaw: It wouldn't let me use even 65536 elements in a static array. I needed the former number because I wanted to make something like a trig table, only for coordinate rotation instead of regular trig.

Wormbo: Try 65535 (maximum unsigned short) or 32767 (maximum signed short). What about using a dynamic array instead?

Foxpaw: I considered that, but then I figured that a dynamic array that large probrably would not be allocated a contiguous block of memory (unless it was a static array) and so there would be a lot of skipping around.

Wormbo: Dynamic arrays allocate a single block of memory. They just might decide to allocate a larger block if more space is required and release the previously used block.

Variable 'variable name' already has a replication definition 
The variable appears more than once in the replication block. You can specify only one replication statement per variable.
'struct': Expecting 'Var', got 'identifier
Structs have to be declared in a certain way and all delcarations within the struct have to begin with var. See also Variable Syntax.
Invalid property or function call on a dynamic array 
Dynamic arrays only have three properties and methods: Length, Insert() and Remove(). See Variable Syntax for details. The most common cause of this error is attempting to do something to an element in an array and forgetting the array index delimiter. For example, doing something like MyArray.bDeleteMe instead of MyArray[i].bDeleteMe.
You can only access default values of variables here 
In static functions you do not have direct access to class-level variables. You can only access function parameters, local variables and, through the default.VariableName syntax, the default values of class variables.

Typecasting[edit]

Cast from 'class name' to 'other class name' will always fail 
You're attempting to perform a typecast which will always fail because the class you're casting to is not a subclass of the variable's class. (That's the case, for instance, if you try to cast a variable of type class<Something> to an object of a different class.)
Cast from 'class name' to 'other class name' is unneccessary 
other class name is either the same class as class name or a superclass of it. This kind of typecasting is not neccessary.
No need to cast 'property type' to itself 
When a property already is of e.g. type int there is no need to cast it to int again when using it. This error also occurs when you work with a "subclass" of a struct (e.g. plane extends vector) and try to cast it to its "superclass" (e.g. vector(aPlaneStuct)).
Can't convert 'property type' to 'other property type
This error occurs when you try to typecast between incompatible variable types like e.g. Object -> Int ("ObjectProperty to IntProperty") or vector -> float ("StructProperty to FloatProperty").

Exec Warnings[edit]

ExecWarning, Import Texture name from filename failed
ExecWarning, Failed factoring: NEW SOUND FILE=filename PACKAGE=packagename NAME=name 
Usually these errors are caused by missing files or typos. Check the spelling of the file name and make sure the file really is where filename points to. Remember that the UT\MyMod directory is the base for specifying file names in #exec lines.
Failed ing package: Can't find file 'filename
The package you specified in an #exec obj line could not be found. Check the spelling of the file name.
ExecWarning, Bad MESH LODPARAMS
ExecWarning, Bad MESH ORIGIN
ExecWarning, Bad MESH SEQUENCE
ExecWarning, Missing meshmap
ExecWarning, Missing meshmap, texture, or num (MESHMAP=meshmap name NUM=number TEXTURE=texture name
All these errors can be caused by a missing file for the mesh. Check for typos and check the log for details about which file is missing.
The last error can also be caused by a missing texture. Make sure the texture is either imported or the texture's package is ed before assigning it to a mesh.
Texture dimensions are not powers of two
Can't find file 'texture file' for import
path and filename of class file(line number) : ExecWarning, Import texture texture name from texture file failed 
These errors always show up together. They are caused, like the message says, when your textures are not sized in a power of two (i.e 32x32, 64x128, etc.).
Unknown property in defaults: the line in defaultproperties 
Mostly the variable is not declared or there are spaces around the "=". Also see Default Properties.
Warning: Failed to 'package': Can't find file for package 'package'
Warning: Failed to 'texture package': Can't find file for package 'package'
Warning: Failed ing package: Can't find file for package 'package
Pingz: I'm getting these warnings from a single #exec statement in my project which intends to a texture package. The package does exist and the url is correct. As a test i deleted the texture package file and the warning changed to the correct Can't find file 'texture package' message. Anyone got a clue as to what this means? Please replace my comment here with some sort of explanation.Category:Legacy Answer Needed

Bizarre Compiler Errors[edit]

Compiler Hangs/Freezes 
This is obviously a difficult type of error to troubleshoot. Simply put, the compiler simply ceases compiling, generally as soon as opening your package or while it is "Analysing..." I'm not certain what causes this, generally I remove classes from the package until eventually it stops doing it, then see which classes it hangs with and which it does not to help isolate the problem. I've found that sometimes I'll accidentally make my classes extend themselves or extend their own subclasses (a result of not paying attention) and this will cause this type of problem. Any further information on what specific conditions can cause this would certainately be appreciated.

Faithful: Having \" anywhere (including inside either style comment) except inside a set of "" will cause the compiler to hang at "Analyzing..." . I have noticed that using \\" in place of \" will prevent this problem.

Compiler suddenly drops back to DOS prompt/whatever 
This is a weird one. It compiles as normal, and while in the "Parsing" section, simply stops. No error message, nothing. Just drops back to the DOS prompt. UCC.log ends mid-comment. The problem turned out to be a struct that I was using – which contained an array of that same struct. The compiler is capable of warping its head around that notion but if you try to actually declare a variable of that struct it doesn't know what to do – kind of like infinite recursion.

Error: VelocityScale::ImportText failed in: -

Error: Unknown member X in StartSizeRangeStartSizeRange →Can be all due to incorrect spacing in the defaultproperties

Error: Unknown member RelativeSize in SizeScale – may be due to using global search and replace in ude

Error: Unknown member b in Color -

-Fataloverdose.-

Unknown[edit]

Related Topics[edit]

Discussion[edit]

Tenative answer here... gurus feel free to confirm or deny this:

Variable is too large (xxx bytes, 255 max)

These occur when you try to access a data structure that is greater then 255 bytes from another object.You might only be trying to access a little bool but if that bool is part of an array of structs whose total size is bigger than 255 bytes then you're not going to be able to code stuff like:

bMyvar = otheractor.bigarray[i].bTheirVar ;

Without the compiler choking and giving that "context: variable is too large" error.

To work round this you can code a method into the object that contains the large structure that returns the element you're after (or, if the object is part of a package you can't recompile, then make a subclass and impliment the method there) like this:

// this is in the actor that contains the large array you need to access
 
function bool checktheirvar(int index)
{
  return(bigarray[index].bTheirVar);
}
 
// and this goes in the other object that's trying to access that data
 
bMyvar=otheractor.Checktheirvar(i);

El Muerte TDS: afaik the variable too large only happens with static arrays and structs, so when you use dynamic arrays it won't happen. With dynamic arrays only a pointer it passed, while with static arrays and structs the whole array/struct will be passed. Yes dynamic arrays are slower, but with a big array it doesn't matter much.

Mychaeel: "Dynamic arrays are slower"? Only if you count adding and removing elements, but that's plain impossible with static arrays. Accessing existing array elements is just as fast as with static arrays.
JoeDark: Accessing existing array elements in a dynamic array is only as fast as a static array if they are handled like Vectors in Java where it is actually a static array disguised as a dynamic array. If it's done as a linked list then access is O(n) compared to the static array's O(1) access time so static access is obviously faster, though unless your dealing with a large n not that much faster.
Foxpaw: Well, there's more than just two possible implementations of the dynamic arrays. The Unreal engine is chock full of caching schemes, tables, and other methods of storing and retrieving data that are far more complex than what one would generally assume of the implementation, and render speculation about the number of operations required for a given operation shaky at best. I wouldn't be surprised if static arrays and dynamic arrays are both stored in a relational database and looked up that way. The only way to really tell which is faster is to time them, but even that wouldn't really be accurate, because there's other stuff to consider.
For instance, if the implementation is as you suggested, (block of memory for array, linked list for dynamic arrays) then you would be doing a great number of operations on the stack. Anyways, I don't know how dynamic arrays or even static arrays are implemented in the Unreal Engine, but I'd question the notion that dynamic arrays are a linked list - because when you pass one to a function you get a duplicate array, not a pointer into an array.
JoeDark: Fair enough, esp. because uscript is an interpreted language arrays might be implemented any number of ways, including relational databases ;)
Red: I presume the issue is because of how the array is stored in memory. and because dynamic ones only pass a pointer rather than the whole array.still getting the infor be accessing with a method is one workable soultion, but i'm not sure if it would be faster than passing a pointer to a dynamic array.... both methods essentially allow you access the pieces of info you want, in sligthly different ways.

So why don't try

var array<mystruct> bigarray< SEMI >

Zedsquared: ok, thanks, cool for UT2003, but UT dosen't properly support dynamic arrays does it? Anyone know any other way around this in UT classic?

Mychaeel: Other than an accessor method, no.

Foxpaw: There is a way around this and it is very graceful, iffin you ask me. It uses a little thing called a linked list which is detailed elsewhere on the Wiki.

Script serialization mismatch[edit]

This is an Error I'm getting while trying to compile with UMake, using the standard directories stated in the compiling with UCC page. I'm basically using the Bulldog scripts as REF.. changing the Tex, Models, and classes names..

Parsing WarthogHeadlight
 
Script serialization mismatch: Got 0, expected -2147483612
 
History: UStruct::Serialize <- (Class WHSkins.TexAlignerPlanar0) <- UState::Serialize <- UClass::Serialize
 <- (Class WHSkins.TexAlignerPlanar0) <- LoadObject
 <- (Class WHSkins.TexAlignerPlanar0 5595020==5595020/5939846 5594999 16) 
<- ULinkerLoad::Pre     <- PreLoadObjects <- UObject::EndLoad <- UObject::LoadPackage <- UEditorEngine::SafeExec 
<- (LOAD FILE=WHSkins.utx) <- UEditorEngine::SafeExec <- (OBJ LOAD FILE=WHSkins.utx) 
<- FScriptCompiler::ProcessCompilerDirective <- Directive <- FScriptCompiler::CompileDeclaration 
<- FScriptCompiler::CompileStatement <- FirstPass <- TryCompile <- FScriptCompiler::CompileScript 
<- (Class Halo.WarthogHeadlight, Pass 0, Line 1) <- MakeScript <- MakeScript <- MakeScript <- MakeScript 
<- MakeScript <- DoScripts <- UEditorEngine::MakeScripts <- UMakeCommandlet::Main
 
Exiting due to error

Wormbo: The error message itself doesn't help solving the problem. At least the WarthogHeadlight class' code should be posted, too.

Adam1972: Actually, I've been hammering away at finding the answer... When I posted the problem I couldn't make

sense of what was happening... This is what I have so far.. I have a texture file called WHSkins.utx, and a mesh file

called WHMeshes.usx That I've created to replace the Bulldog textures and also A Warthog mesh from Halo to replace the

Warthog... So I assume I should be able to basically plug in the diffrences, at least to get it to go. When You look at

the Bulldog.uc ....

#exec OBJ LOAD FILE=..\staticmeshes\BulldogMeshes.usx
#exec OBJ LOAD FILE=..\sounds\WeaponSounds.uax
#exec OBJ LOAD FILE=..\textures\VehicleFX.utx

Adam1972: Then comparing it to my Warthog.uc:

#exec OBJ LOAD FILE=..\staticmeshes\WHMeshes.usx
#exec OBJ LOAD FILE=..\sounds\WeaponSounds.uax
#exec OBJ LOAD FILE=..\textures\WHSkins.utx

Adam1972: You'll see I only changed the filename.. I followed the Instructions on compiling with UCC and figure that the directories inside the project should match what is listed in the UCC compiling page.. so I made a Halo directory and placed a Class, Textures, and Models folder inside. Umake begins to parse the files and when it hits the WarthogHeadlight.uc file which looks like this:

#exec OBJ LOAD FILE=WHSkins.utx
 
class WarthogHeadlight extends DynamicProjector;
 
// Empty tick here - do detach/attach in Warthog tick
function Tick(float Delta)
{
 
}

It returns a WHSkins.utx not found. This script is exactly like the original BulldogHeadlight.uc script. I get the same

with the scripts calling on the WHMeshes.usx.

If I change it to #exec OBJ LOAD FILE=..\textures\WHSkins.utx it still does not find the files. If I place those same 2

files into the UT2003 folder in their respective folders.. Well that's when I get the "Script serialization mismatch"

error. I get no errors associated with the script itself, the only problem I found with that was the "defaultproperties"

that all the decompiled originals have.. my warthog ones seemed to cause errors until I deleted those "defaultproperties".

I'm stumped.... Please help :S

Foxpaw: I don't have UT2003 but I have found something that I think may be the problem. It doesn't surprise me that neither FILE=WHSkins.utx nor FILE=..\textures\WHSkins.utx finds the headlight. The former will look in the base directory of your class, the "Halo" directory, and the second goes up a step then looks in the base directory of your UT2003 install to find a package called "textures." Remember it starts from "Halo," not "Halo\classes." ".." means up one directory. What you need to put to reference "Halo\textures" is "FILE=.\textures\WHSkins.utx." Scratch the last dot, that's just for correct punctuation. ".." means go up one directory, "." means look in this directory. It's basically the same as writing "FILE=\textures\WHSkins.utx" except that the compiler won't accept that, so the single dot is used to denote a subdirectory of the one it starts in.

Languard: Minor correction: UT2003 does accept "FILE=\textures\ect" I don't think having the current directory dot will hurt, but it isn't needed. Not on XP at least, it might be different for the other OS's. As a side note, I'm not sure why they the object files with exec statments, since it is not needed. I know this because for my sword attachment class, I use an animated mesh that I've placed in the Animations directory, but I do not have any exec statments to it, and it works fine. The only thing I can think of is maybe it is for performance reasons.

Languard: Correction to previous satement, you do need the statments. My misconception was due to some really bad coding on my part, and I forgot about this one statement I had in a wierd spot. Yet another reason why you should always code neatly, even if it is throwaway code.

Foxpaw: Yes, I don't think you need the dots, the problem with the code that was listed was that it had a double dot and was going up one directory isntead of going fromt he current directory. You actually don't need the statements if you have the thing you were going to already in another package, so long as you refer to that package at compile-time. I never use statements and it works fine for me.

Lilguy: just added some stuff to the "unresolved reference" error.

FatalOverdose Added "just added 'Error, Bad or missing expression in 'If'". This a very usfull page but its getting to big.

Tarquin: All the comments and chat need to be refactored into document mode. That would slim it down a bit! :)