February 5, 2001, 16:45
|
#1
|
Warlord
Local Time: 04:52
Local Date: October 31, 2010
Join Date: Sep 2000
Location: Tampa, Florida
Posts: 117
|
Need help with mod prob
Hey
I'm working on a mod for personal use and when I try and load the scenario I get this error message:
units.txt:2061:Unknown token
Line 2061 is the second line below: UNIT_IRONCLAD {
I don't see anything wrong with that line or with the entire unit section. Anybody see anything I missed?
## UNIT 35
UNIT_IRONCLAD {
Description DESCRIPTION_UNIT_IRONCLAD
DefaultIcon ICON_UNIT_IRONCLAD
DefaultSprite SPRITE_IRONCLAD
Category UNIT_CATEGORY_NAVAL
Attack 40
Defense 30
ZBRangeAttack 40
Firepower 3
Armor 3
MaxHP 10
ShieldCost 500
PowerPoints 100
ShieldHunger 5
FoodHunger 0
MaxMovePoints 300
VisionRange 1
EnableAdvance ADVANCE_MODERN_METALLURGY
ObsoleteAdvance ADVANCE_ADV_NAVAL_TACTICS
BombRounds 5
BombardRange 1
ActiveDefenseRange 0
LossMoveToDmgNone
MaxFuel 0
IgnoreZOC
NoZoc
CanPillage
CanPirate
CantCaptureCity
ExertsMartialLaw
DeathEffectsHappy
Explodes
IsFlanker
SoundSelect1 SOUND_SELECT1_IRONCLAD
SoundSelect2 SOUND_SELECT2_IRONCLAD
SoundMove SOUND_MOVE_IRONCLAD
SoundAcknowledge SOUND_ACKNOWLEDGE_IRONCLAD
SoundCantMove SOUND_CANTMOVE_IRONCLAD
SoundAttack SOUND_ATTACK_IRONCLAD
SoundWork SOUND_WORK_IRONCLAD
SoundVictory SOUND_VICTORY_IRONCLAD
SoundDeath SOUND_DEATH_IRONCLAD
CanAttack: Sea
CanAttack: ShallowWater
CanBombard: Water
CanSee: Standard
MovementType: Sea
MovementType: ShallowWater
Size: Large
VisionClass: Underwater
CanReform {
Sound SOUND_ID_REFORM_CITY
Effect SPECEFFECT_REFORMCITY
}
}
Made a couple of changes, changed the vision class and added the IgnoreZOC and NoZoc tags and removed CanExpel. Oh yeah, also added IsFlanker but I did that with several other units also. I can't figure it out. Any help?
Btw, have Diplomod installed and also have the PWSlic and Frenzy SLIC in this scenario.
Thanks in advance
|
|
|
|
February 5, 2001, 16:57
|
#2
|
Prince
Local Time: 10:52
Local Date: October 31, 2010
Join Date: Dec 2000
Location: in perpetuity
Posts: 4,962
|
It actually souns like the problem lies in uniticon.txt. It may be that there is a spelling error in the ICON_UNIT_IRONCLAD line, so when the game looks for ICON_UNIT_IRONCLAD, it can't find it, hence it says "unknown token".
I hope this helps
Ben
|
|
|
|
February 5, 2001, 17:14
|
#3
|
Deity
Local Time: 11:52
Local Date: October 31, 2010
Join Date: Nov 1999
Location: De Hel van Enschede
Posts: 11,702
|
Description isn't used in the game, so DESCRIPTION_UNIT_IRONCLAD probably doens't exist. Replace it with DESCRIPTION_UNIT_WARRIOR or whatever and the problem should go away...
|
|
|
|
February 5, 2001, 17:19
|
#4
|
Emperor
Local Time: 10:52
Local Date: October 31, 2010
Join Date: Mar 1999
Location: Zwolle, The Netherlands
Posts: 6,737
|
I think it is more likely that the entry for the previous unit wasn't properly closed with a }. In that case the game would think that UNIT_IRONCLAD is a flag for the unit coming before it. This sort of problems in units.txt often result from non-matching numbers of left { and right } brackets.
Edit: or Locutus may be right. I hadn't noticed that yet.
[This message has been edited by Paul (edited February 05, 2001).]
|
|
|
|
February 5, 2001, 17:48
|
#5
|
Prince
Local Time: 10:52
Local Date: October 31, 2010
Join Date: Dec 2000
Location: in perpetuity
Posts: 4,962
|
DESCRIPTIONS are in place and the ironclad decription is there. The lines may not be used as such, but they are in junk_str.txt.
According to strings.txt the stuff in junk_str.txt is needed for the executable.
|
|
|
|
February 5, 2001, 18:49
|
#6
|
Warlord
Local Time: 04:52
Local Date: October 31, 2010
Join Date: Sep 2000
Location: Tampa, Florida
Posts: 117
|
Paul, you are correct. The previous unit was missing a "}" Thanks very much!
Now I've gotta go search out all the other bugs...like how many times I spelled "Mountain" as "Moutain."
|
|
|
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is On
|
|
|
All times are GMT -4. The time now is 05:52.
|
|