Posted by: braxt - Monday, May 18, 2015 7:14:49 PM
Alright so, I've been trying to add a new faction for a while now.
And when I finally got everything working and everything as it should be,
This happens. "; Reason Uncaught Exception during initialization."... Yup...
Any solutions? Because I dunno what the heck's going' on.
Regards.
Posted by: CommieDog - Monday, May 18, 2015 8:02:12 PM
Have you tried running WorldBuilder with the mod? It usually gives more specific error messages.
Posted by: braxt - Tuesday, May 19, 2015 12:45:10 AM
[quote=CommieDog;137367]Have you tried running WorldBuilder with the mod? It usually gives more specific error messages.[/quote]
Well, Worldbuiler Works fine, So Theres no problem there.
Posted by: Annihilationzh - Tuesday, May 19, 2015 7:01:55 AM
We aren't psychic. We can't see what you've done.
Posted by: braxt - Wednesday, May 20, 2015 3:08:31 AM
[quote=Annihilationzh;137369]We aren't psychic. We can't see what you've done.[/quote]
Ok, Sorry good point. Heres what I've done.
This is my commandbutton stuff
---------------------------------------------------------------
United Nations
---------------------------------------------------------------
CommandButton Command_ConstructUnitedNationsDozer
Command = UNIT_BUILD
Object = AmericaVehicleDozer
TextLabel = CONTROLBAR:ConstructUnitedNationsDozer
ButtonImage = SACDozer
ButtonBorderType = BUILD ; Identifier for the User as to what kind of button this is
DescriptLabel = CONTROLBAR:ToolTipUSABuildDozer
End
CommandButton Command_ConstructUnitedNationsCommandCenter
Command = DOZER_CONSTRUCT
Object = AmericaCommandCenter
TextLabel = CONTROLBAR:ConstructAmericaCommandCenter
ButtonImage = SAComCentr
ButtonBorderType = BUILD ; Identifier for the User as to what kind of button this is
DescriptLabel = CONTROLBAR:ToolTipUSABuildCommandCenter
End
---------
This is my Commandset stuff
------------------------
UnitedNations;;;;;;;;;;;
------------------------
CommandSet UnitedNationsDozerCommandSet
1 = Command_ConstructAmericaPowerPlant
2 = Command_ConstructAmericaStrategyCenter
3 = Command_ConstructAmericaBarracks
4 = Command_ConstructAmericaSupplyDropZone
5 = Command_ConstructAmericaSupplyCenter
6 = Command_ConstructAmericaParticleCannonUplink
7 = Command_ConstructAmericaPatriotBattery
8 = Command_ConstructAmericaCommandCenter
9 = Command_ConstructAmericaFireBase
11 = Command_ConstructAmericaWarFactory
13 = Command_ConstructAmericaAirfield
14 = Command_DisarmMinesAtPosition
End
CommandSet UnitedNationsCommandCenterCommandSet
1 = Command_ConstructUnitedNationsDozer
2 = Command_SpectreGunship
4 = Command_LeafletDrop
5 = Command_A10ThunderboltMissileStrike
6 = Command_Paradrop
7 = Command_SpyDrone
8 = Command_EmergencyRepair
9 = Command_DaisyCutter ;NOTE THIS GETS UPGRADED BELOW
10 = Command_SpySatelliteScan
13 = Command_SetRallyPoint
14 = Command_Sell
End
;Kris: Not anymore. The commandbutton will automatically upgrade from Command_DaisyCutter to Command_MOAB.
;CommandSet UnitedNationsCommandCenterCommandSetUpgradedToMOAB
; 1 = Command_ConstructUnitedNationsDozer
; 2 = Command_SpectreGunship
; 4 = Command_LeafletDrop
; 5 = Command_A10ThunderboltMissileStrike
; 6 = Command_Paradrop
; 7 = Command_SpyDrone
; 8 = Command_EmergencyRepair
; 9 = Command_MOAB ;NOTE THIS GOT UPGRADED FROM ABOVE
; 10 = Command_SpySatelliteScan
; 13 = Command_SetRallyPoint
; 14 = Command_Sell
;End
;Rank 1 only has 4 positions
CommandSet SCIENCE_UnitedNations_CommandSetRank1
1 = Command_PurchaseSciencePaladinTank
2 = Command_PurchaseScienceStealthFighter
3 = Command_PurchaseScienceSpyDrone
END
; Rank 3 assign buttons to position like so:
; 1 4 7 10 13
; 2 5 8 11 14
; 3 6 9 12 15
CommandSet SCIENCE_UnitedNations_CommandSetRank3
1 = Command_PurchaseSciencePathfinder
4 = Command_PurchaseScienceParadrop1
5 = Command_PurchaseScienceParadrop2
6 = Command_PurchaseScienceParadrop3
7 = Command_PurchaseScienceA10ThunderboltMissileStrike1
8 = Command_PurchaseScienceA10ThunderboltMissileStrike2
9 = Command_PurchaseScienceA10ThunderboltMissileStrike3
10 = Command_PurchaseScienceEmergencyRepair1
11 = Command_PurchaseScienceEmergencyRepair2
12 = Command_PurchaseScienceEmergencyRepair3
END
; Rank 8 has 3 positions
CommandSet SCIENCE_UnitedNations_CommandSetRank8
1 = Command_PurchaseScienceDaisyCutter
2 = Command_PurchaseScienceLeafletDrop
3 = Command_PurchaseScienceSpectreGunship
4 = Command_FAKECOMMAND_PurchaseScienceMOAB ;Need the slot (it's SCRIPT_ONLY) and hidden.
END
----
This is my Control bar stuff
ControlBarScheme UnitedNations8x6
ScreenCreationRes X:800 Y:600
Side UnitedNations
QueueButtonImage SCBigButton
RightHUDImage SALogo
CommandBarBorderColor R:0 G:21 B:126 A:255 ;blue
BuildUpClockColor R:0 G:0 B:0 A:160
ButtonBorderBuildColor R:67 G:108 B:190 A:255 ;blue
ButtonBorderActionColor R:1 G:175 B:2 A:255 ;Green
ButtonBorderUpgradeColor R:208 G:108 B:0 A:255 ;Orange
ButtonBorderSystemColor R:207 G:195 B:2 A:255 ;yellow
GenBarButtonIn SABarButtonGen2IN
GenBarButtonOn SABarButtonGen2ON
ToggleButtonUpIn SAMinMaxUH
ToggleButtonUpOn SAMinMaxU
ToggleButtonUpPushed SAMinMaxUP
ToggleButtonDownIn SAMinMaxH
ToggleButtonDownOn SAMinMax
ToggleButtonDownPushed SAMinMaxP
OptionsButtonEnable SAOptions
OptionsButtonHightlited SAOptionsH
OptionsButtonPushed SAOptionsP
IdleWorkerButtonEnable SAWorker
IdleWorkerButtonHightlited SAWorkerH
IdleWorkerButtonPushed SAWorkerP
IdleWorkerButtonDisabled SAWorkerI
BuddyButtonEnable SAChat
BuddyButtonHightlited SAChatH
BuddyButtonPushed SAChatP
BeaconButtonEnable SABeacon
BeaconButtonHightlited SABeaconH
BeaconButtonPushed SABeaconP
OptionsButtonDisabled SAOptionsI
BuddyButtonDisabled SAChatI
BeaconButtonDisabled SABeaconI
GeneralButtonEnable SAGeneral
GeneralButtonHightlited SAGeneralH
GeneralButtonPushed SAGeneralP
GeneralButtonDisabled SAGeneralI
UAttackButtonEnable SAUAttackI
UAttackButtonHightlited SAUAttackH
UAttackButtonPushed SAUAttackP
MinMaxButtonEnable SAMinMax
MinMaxButtonHightlited SAMinMaxH
MinMaxButtonPushed SAMinMaxP
MinMaxUL X:646 Y:432
MinMaxLR X:718 Y:463
GeneralUL X:719 Y:432
GeneralLR X:799 Y:463
UAttackUL X:140 Y:412
UAttackLR X:175 Y:430
OptionsUL X:184 Y:490
OptionsLR X:220 Y:514
WorkerUL X:184 Y:516
WorkerLR X:220 Y:540
ChatUL X:184 Y:568
ChatLR X:220 Y:592
BeaconUL X:184 Y:545
BeaconLR X:220 Y:566
PowerBarUL X:260 Y:470
PowerBarLR X:538 Y:476
ExpBarForegroundImage SAExpBar
MoneyUL X:360 Y:438
MoneyLR X:439 Y:457
GenArrow USLevelUP
CommandMarkerImage SAEmptyFrame
ImagePart
Position X:0 Y:408
Size X:800 Y:191
ImageName InGameUIAmericaBase
Layer 4 ;; layer means how deep the image will be drawn, it's a number between 0-5 with 0 being on top
End
PowerPurchaseImage GeneralsPowerWindow_American
End
-----------------------------
And the Player Template.
PlayerTemplate FactionUnitedNations
Side = UnitedNations
BaseSide = USA
PlayableSide = Yes
StartMoney = 0
PreferredColor = R:0 G:0 B:255
IntrinsicSciences = SCIENCE_AMERICA
PurchaseScienceCommandSetRank1 = SCIENCE_UnitedNations_CommandSetRank1
PurchaseScienceCommandSetRank3 = SCIENCE_UnitedNations_CommandSetRank3
PurchaseScienceCommandSetRank8 = SCIENCE_UnitedNations_CommandSetRank8
SpecialPowerShortcutCommandSet = SpecialPowerShortcutUSA
SpecialPowerShortcutWinName = GenPowersShortcutBarUS.wnd
SpecialPowerShortcutButtonCount = 10
DisplayName = INI:FactionUnitedNations
StartingBuilding = UnitedNationsCommandCenter
StartingUnit0 = UnitedNationsVehicleDozer
ScoreScreenImage = America_ScoreScreen
LoadScreenImage = SAFactionLogoPage_US
LoadScreenMusic = Load_USA
ScoreScreenMusic = Score_USA
;HeadWaterMark = SCTempSelectPortrait ; don't use unless we add a "generalshead for non selected generals
FlagWaterMark = WatermarkUSA
EnabledImage = SSObserverUSA
BeaconName = MultiplayerBeacon
SideIconImage = GameinfoAMRCA
GeneralImage = USA_Logo
OldFaction = Yes ; This faction was available in the original Generals and should be available even if the oldFactionsOnly flag is set
ArmyTooltip = TOOLTIP:BioStrategyLong_USA
Features = GUI:BioFeatures_USA
MedallionRegular = USAGeneral_slvr
MedallionHilite = USAGeneral_blue
MedallionSelect = USAGeneral_orng
End
----------
Yeah I dunno how to do spoilers, or if this website has them so, Sorry about that.
Also, I have my "UnitedNations.ini in "C:\Documents and Settings\DELL\My Documents\Command and Conquer Generals Zero Hour Data\INI\Object" Not sure if thats right but hey, That why Im posting it.
Anyways, There must be a problem in there somewhere... Right?
Posted by: klingondragon - Wednesday, May 20, 2015 3:18:00 AM
Only object data should be in ini/object
All the other data should be in its respective folders
Also where is your player template code
Most importantly: The ini folder must be in the data folder of the generals folder in your program files folder of th C:/ drive.
Posted by: braxt - Wednesday, May 20, 2015 4:42:13 AM
[quote=klingondragon;137376]Only object data should be in ini/object
All the other data should be in its respective folders
Also where is your player template code
Most importantly: The ini folder must be in the data folder of the generals folder in your program files folder of th C:/ drive.[/quote]
Edit-ted The Playertemplate in.
Also I moved the INI where you said to.
Posted by: Zatsupachi - Wednesday, May 20, 2015 4:48:16 AM
1. You can spoiler with [spoiler] tag and you can also put code in [code] tags.
2. Don't make me sift through your code. That's too much to show at once.
-why don't you remove all the changes you made and put them back one by one(or segment by segment) while testing the game as you go. Maybe then you can deduce WHERE the crash starts.
Posted by: klingondragon - Wednesday, May 20, 2015 6:19:13 AM
That is precisely what my tutorial tells you to do
Posted by: Annihilationzh - Wednesday, May 20, 2015 8:00:00 AM
1) You don't have Command_ConstructUnitedNationsCommandCenter in CommandSet.ini, but you do have it in CommandButton.ini. This won't cause a crash, but it's not right either.
2) Have you created a UnitedNationsCommandCenter and a UnitedNationsVehicleDozer in UnitedNations.ini? You mention both of these in the PlayerTemplate, but you didn't post any code suggesting that you have created them.
3) You have this line:
[code]UnitedNations;;;;;;;;;;;[/code]
Is this in your files exactly like this? Because this needs to be commented out. Like this:
[code];UnitedNations;;;;;;;;;;;[/code]
That first ; tells the game not to read UnitedNations as code, but to instead treat it as a comment that you've added for yourself to read.
[quote=klingondragon;137379]That is precisely what my tutorial tells you to do[/quote]
I received a PM about your tutorial some time ago, because it was crashing someone's game. I checked it over and your tutorial isn't complete; it will actually crash the game if you follow it.
Posted by: klingondragon - Wednesday, May 20, 2015 1:46:30 PM
What went wrong?
Posted by: braxt - Wednesday, May 20, 2015 6:23:11 PM
[quote=Annihilationzh;137380]1) You don't have Command_ConstructUnitedNationsCommandCenter in CommandSet.ini, but you do have it in CommandButton.ini. This won't cause a crash, but it's not right either.
2) Have you created a UnitedNationsCommandCenter and a UnitedNationsVehicleDozer in UnitedNations.ini? You mention both of these in the PlayerTemplate, but you didn't post any code suggesting that you have created them.
3) You have this line:
[code]UnitedNations;;;;;;;;;;;[/code]
Is this in your files exactly like this? Because this needs to be commented out. Like this:
[code];UnitedNations;;;;;;;;;;;[/code]
That first ; tells the game not to read UnitedNations as code, but to instead treat it as a comment that you've added for yourself to read.
[quote=klingondragon;137379]That is precisely what my tutorial tells you to do[/quote]
I received a PM about your tutorial some time ago, because it was crashing someone's game. I checked it over and your tutorial isn't complete; it will actually crash the game if you follow it.[/quote]
Yes I've created a UnitedNations.ini And have the Command center and dozer stuff in them.
Posted by: Annihilationzh - Thursday, May 21, 2015 9:42:03 AM
I used an INI checker. There is nothing else wrong with the code you posted. So either you have a TAB or some other illegal character hidden in your code, or you haven't posted the code containing the error.