Unknown unit type error

The place to post your WML questions and answers.

Moderator: Forum Moderators

Forum rules
  • Please use [code] BBCode tags in your posts for embedding WML snippets.
  • To keep your code readable so that others can easily help you, make sure to indent it following our conventions.
Post Reply
Zmoj
Posts: 14
Joined: October 6th, 2012, 6:04 pm

Unknown unit type error

Post by Zmoj »

Hey guys, I've been having problems with loading a scenario due to game error of unknown unit type (Lich Lord). I checked CFG files but couldn't find anything that causes this error. I'm playing on 1.12.4 version of Wesnoth.
Lich_Lord.cfg
(6.18 KiB) Downloaded 313 times
Lich_Lord_Jevyan.cfg
This is, I guess, a unit of that unit type that appears in the scenario that won't load
(6.49 KiB) Downloaded 187 times
_main.cfg
(6.16 KiB) Downloaded 184 times
Sorry if I made a mistake since I'm new to doing this.
User avatar
Bitron
Developer
Posts: 453
Joined: October 19th, 2015, 9:23 am
Location: Germany

Re: Unknown unit type error

Post by Bitron »

Well, you have id=Lich Lord WotJ in Lich_Lord.cfg and id=Lich Lord Jevyan in Lich_Lord_Jevyan.cfg. If you call id=Lich Lord within the scenario, it doesn't match with either Lich_Lord.cfg or Lich_Lord_Jevyan.cfg unit types.
Zmoj
Posts: 14
Joined: October 6th, 2012, 6:04 pm

Re: Unknown unit type error

Post by Zmoj »

Wow, it was simple as that. Dumb me.

Thanks for the help though!
Zmoj
Posts: 14
Joined: October 6th, 2012, 6:04 pm

Re: Unknown unit type error

Post by Zmoj »

Hmm, now I've experienced a different problem. Although removing WotJ in id I've managed to play the scenario (where the lich lord was Jevyan, so I'm not sure why Lich_Lord_Jevyan file is even counted if fix had to be done in Lich_Lord file) few scenarios later same error appears but it asks for Lich Lord WotJ unit type. But now, I added that part in id (some scenarios are intended to run on Lich Lord WotJ id, not just Lich Lord) the error remains. Not sure what exactly needs to be written in the id or the whole .cfg file if it won't run on that id.
User avatar
zookeeper
WML Wizard
Posts: 9742
Joined: September 11th, 2004, 10:40 pm
Location: Finland

Re: Unknown unit type error

Post by zookeeper »

The error means exactly what it says. You're trying to make a unit that is of a unit type which doesn't exist. Unit type is determined by the [unit_type] id=, nothing else.
Zmoj
Posts: 14
Joined: October 6th, 2012, 6:04 pm

Re: Unknown unit type error

Post by Zmoj »

Yea, but it doesn't work whether the id is Lich Lord or Lich Lord WotJ, but few scenarios back there was an WML error saying that unit doesn't exist which I reckoned was because I deleted WotJ part from id to play another scenario, so I wrote WotJ again and there was no error, the unit appeared ingame, although I had to delete that part again later. I'm not sure if it's trying to make a new unit type if it was originally meant to be in that campaign and it worked fine for meant unit type (Lich Lord). Thing is then, even if the unit type shouldn't have WotJ in it's id, when I erase it, it still doesn't start and error appears, which make me wonder what the hell should be written then? Or is the error somewhere else in the .cfg file?
User avatar
zookeeper
WML Wizard
Posts: 9742
Joined: September 11th, 2004, 10:40 pm
Location: Finland

Re: Unknown unit type error

Post by zookeeper »

No one knows what you're doing wrong without seeing the code. Except that you're still trying to create a unit that is of a unit type which doesn't exist, that much is clear.
User avatar
Halbling
Posts: 16
Joined: February 19th, 2017, 5:12 pm
Location: Germany

Re: Unknown unit type error

Post by Halbling »

I'm not quite sure, whether I understand your problem rigth or not, or if you allready solved it. But I got an idea:
Probably you have been working with diffrent id's for different scenarios. Maybe you should check your scenarios for that...
Post Reply