Jump to content
Sign in to follow this  
freak4twenty

Error when adding Commands for new units

Recommended Posts

I made a unit and first tested it out by modifying an existing unit. After I got the results I wanted I wanted to be able to test the damage side by side with the original unit.

 

I used the American Missile Defender. I know the weapons work correctly and I've been able to load without 2 of the ini files, unfortunately I need those 2 ini files to test the units side by side.

 

Here are the changes causing the errors:

 

From CommandButton.ini:

 

CommandButton Command_ConstructAmericaInfantryJavelinDefender
 Command	   = UNIT_BUILD
 Object		= AmericaInfantryJavelinDefender
 TextLabel	 = CONTROLBAR:ConstructAmericaInfantryMissileDefender
 ButtonImage   = SAMissleDefender
 ButtonBorderType		= BUILD ; Identifier for the User as to what kind of button this is
 DescriptLabel		   = CONTROLBAR:ToolTipUSABuildMissileDefender
End

 

From CommandSet.ini:

 

CommandSet AmericaInfantryJavelinDefenderCommandSet
 11 = Command_AttackMove
 13 = Command_Guard
 14 = Command_Stop
End


CommandSet AmericaBarracksCommandSet
 1 = Command_ConstructAmericaInfantryRanger
 2 = Command_ConstructAmericaInfantryMissileDefender
 3 = Command_ConstructAmericaInfantryColonelBurton
 4 = Command_ConstructAmericaInfantryPathfinder
 5 = Command_ConstructAmericaInfantryJavelinDefender
 6 = Command_ConstructAmericaInfantryBiohazardTech
 7 = Command_UpgradeAmericaRangerFlashBangGrenade
 8 = Command_UpgradeAmericaRangerCaptureBuilding
 13 = Command_SetRallyPoint
 14 = Command_Sell
End

 

Does anyone know what I'm doing wrong?

 

Update: I reinstalled Zero Hour and tried it again... guess it was something else

Edited by freak4twenty

Share this post


Link to post

Does "AmericaInfantryJavelinDefender" exist under that exact name?

Share this post


Link to post

It was a typo somewhere in my code, probably in the AmericanInfantry.ini.

 

It's working now.

 

I'm going to end up rewriting the whole thing anyway.

 

I just wanted to test the damage output side by side with the Missile Defender.

 

The Javelin Defender has 4 seconds between shots so I wanted to make sure the damage was still higher, but not too much higher, than the Missile Defender.

 

I know I'm going to run into balancing issues further down the road, but I like to check my code out piece by piece.

 

I've noticed that it doesn't matter what the name of the .ini is in the Object folder, and that you can actually add more folders for better sorting, so I will be putting each individual object in it's own file.

 

Warning to those who also want to do this: you must keep the original files in the exact location where the ".big" file has it located. Empty the file out (delete everything inside). This is so no duplicates are created if you use the same object names as what is in the original files. For instance: AmericaSupplyCenter is in FactionBuilding.ini which in turn is in INIZH.big so if you were to give it it's own file, say AmericaSupplyCenter.ini for instance you would need to remove that reference (or change the name) in FactionBuilding.ini and keep FactionBuilding.ini in the Object folder, or when you build it, 2 chinooks will take off. This is because it has 2 different references telling it to do the same thing. It might cause other bugs as well although I have not encountered any.

Share this post


Link to post

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

  • Recently Browsing   0 members

    No registered users viewing this page.

×