View Full Version : UCC compiling error...

Call me Erdrik
17th Dec 2005, 05:39 PM
Im having a strange problem trying to compile my mod with UCC...
the file in question 'SH_AScouts.uc' has many calls to the function

simulated function SetSystemsPwrDrain()

'SH_AScouts.uc' is a subclass of 'SH_ARaceShips.uc' which in turn is a subclass of 'SH_Ships.uc', which clearly contains the called function.

This is the error in the UCC log:

Error: C:\Program Files\UT2004\Ships\Classes\SH_AScouts.uc(589) : Error, 'SetSystemsPwrDrain': Bad command or expression

The only thing I can think of ( and I'm really guessing here ) is that the name of the .uc files maybe determines the order in which they are compiled and that 'SH_AScouts.uc' is being compiled before 'SH_Ships.uc'. But that dosen't seem to make any sense to me... :(

does anyone have any clue as to what is wrong? If you need any more info post what you need and Ill post it up...

17th Dec 2005, 06:16 PM
I'd need to see the code (SH_AScouts line 589).

Call me Erdrik
17th Dec 2005, 07:56 PM
Auto State Running
Function Timer()
// MainHull.Operations.HyperCharging PowerManagment
If (HypChrg >= 1000)
//log("bHypChrged = True");
HypChrg = 1000;
bHypChrged = True;
Each Tick, Systems will check if there is enough energy to run them
in order of priority. If not they woll be turned off. Running systems
Systems are Weapons, Shields, Engines, MiscDevices, and Base Cost
Each Hull is also Checked
*589* SetSystemsPwrDrain();

I noticed something as I copied this code. the function is called in a state... and the function in the parent class is not in a state. Could this be the problem? I haven't had much experience with states :P

17th Dec 2005, 08:11 PM
If it doesn't give you an error for the other instances of the function call then it could be a simple syntax error.

Call me Erdrik
17th Dec 2005, 08:59 PM
syntax? mmm not sure, what would cause the syntax error...
If you like I can post the files and you can take a closer look?

(tho I'm not sure if my messy coding will make it any easier :P lol )

EDIT: I fixed it by adding a SetSystemsPwrDrain() function in the state
and simply adding Super.SetSystemsPwrDrain(); :P

19th Dec 2005, 08:30 AM
You 100% copied the code from your *.uc. There is this *589* in front of your function call, that doesn't seem right, ever tried to take this out?

[SAS]Solid Snake
19th Dec 2005, 01:42 PM
I think that was used to indicate the line of the problem. Calling a super only means that it will call the parent function, although that should work. Its hard to tell when I can only see a small segment of the code.

Call me Erdrik
20th Dec 2005, 09:42 AM
Ok, Now its not recognizing variables declared in SH_Ships.uc...

Im gunna just post the three files...
this is the error:

Error: C:\Program Files\UT2004\Ships\Classes\SH_AScouts.uc(670) : Error, Bad or missing expression after '<'

It dosen't seem to recognize the expression 'ShipWeapons' Even tho it is in the variables in the parent class SH_Ships.uc... :mad:
Is there something I need declared at the begining of the state or something?? I always thought that was for excludes and replication...

EDITi: Doh forgot to post the files :o

EDITii: Ok heres something wierd... I commented out the whole damn file(and any other file that cuased problems...) of course UCC compiled fine. but when I looked in Unreal ED, old classes that I had in the mod( and have since DELETED!! ) are in the class list!
These files ( and some others ) are NOT in c:\program files\UT2004\ships\classes and yet show up in Unreal ED. I have deleted both Ships.u and Ships.ucl and successfuly compiled twice, and yet they still show up in unreal ED! :con: