1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.
  2. 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.

UCC compiling error...

Discussion in 'Programming' started by Call me Erdrik, Dec 17, 2005.

  1. Call me Erdrik

    Call me Erdrik Arch Mage

    Joined:
    Nov 24, 1999
    Messages:
    334
    Likes Received:
    0
    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
    '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:
    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...
     
  2. Angel_Mapper

    Angel_Mapper Goooooooats

    Joined:
    Jun 17, 2001
    Messages:
    3,532
    Likes Received:
    3
    I'd need to see the code (SH_AScouts line 589).
     
  3. Call me Erdrik

    Call me Erdrik Arch Mage

    Joined:
    Nov 24, 1999
    Messages:
    334
    Likes Received:
    0
    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
     
  4. Angel_Mapper

    Angel_Mapper Goooooooats

    Joined:
    Jun 17, 2001
    Messages:
    3,532
    Likes Received:
    3
    If it doesn't give you an error for the other instances of the function call then it could be a simple syntax error.
     
  5. Call me Erdrik

    Call me Erdrik Arch Mage

    Joined:
    Nov 24, 1999
    Messages:
    334
    Likes Received:
    0
    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: Dec 17, 2005
  6. Hazard.ep

    Hazard.ep New Member

    Joined:
    Oct 7, 2003
    Messages:
    166
    Likes Received:
    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?
     
  7. [SAS]Solid Snake

    [SAS]Solid Snake New Member

    Joined:
    Jun 7, 2002
    Messages:
    2,633
    Likes Received:
    0
    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.
     
  8. Call me Erdrik

    Call me Erdrik Arch Mage

    Joined:
    Nov 24, 1999
    Messages:
    334
    Likes Received:
    0
    Ok, Now its not recognizing variables declared in SH_Ships.uc...

    Im gunna just post the three files...
    this is the error:
    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:
     

    Attached Files:

    Last edited: Dec 20, 2005

Share This Page