UCC compiling error...

  • Two Factor Authentication is now available on BeyondUnreal Forums. To configure it, visit your Profile and look for the "Two Step Verification" option on the left side. We can send codes via email (may be slower) or you can set up any TOTP Authenticator app on your phone (Authy, Google Authenticator, etc) to deliver codes. It is highly recommended that you configure this to keep your account safe.

Call me Erdrik

Arch Mage
Nov 24, 1999
334
0
0
43
Spring Hill, FL, USA
www.geocities.com
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...
 

Call me Erdrik

Arch Mage
Nov 24, 1999
334
0
0
43
Spring Hill, FL, USA
www.geocities.com
Code:
Auto State Running
{
...
	Function Timer()
	{
	...
		//===================================================
		// MainHull.Operations.HyperCharging PowerManagment
		//===================================================
			HypChrg++;
			If (HypChrg >= 1000)
			{   
				//log("bHypChrged = True");
				HypChrg = 1000;
				bHypChrged = True;
			}
			/*
			Power:
			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
			WILL NOT ACTUALY DRAIN POWER!!!!
			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
 

Call me Erdrik

Arch Mage
Nov 24, 1999
334
0
0
43
Spring Hill, FL, USA
www.geocities.com
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
 
Last edited:

Hazard.ep

New Member
Oct 7, 2003
166
0
0
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?
 

Call me Erdrik

Arch Mage
Nov 24, 1999
334
0
0
43
Spring Hill, FL, USA
www.geocities.com
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 :eek:

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!
SH_AShipA.uc
SH_AShipAa.uc
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:
 

Attachments

  • files.zip
    12.4 KB · Views: 9
Last edited: