Unknown unit type error
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.
Unknown unit type error
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.
Sorry if I made a mistake since I'm new to doing this.Re: Unknown unit type error
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.Developer of Project Haldric
Add-ons: Millennium Era, Vision of a Shaman, A New Home
Art: Bitron's Art Thread
Tools: WML Syntax Highlighter for VS Code
Add-ons: Millennium Era, Vision of a Shaman, A New Home
Art: Bitron's Art Thread
Tools: WML Syntax Highlighter for VS Code
Re: Unknown unit type error
Wow, it was simple as that. Dumb me.
Thanks for the help though!
Thanks for the help though!
Re: Unknown unit type error
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.
Re: Unknown unit type error
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.
Re: Unknown unit type error
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?
Re: Unknown unit type error
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.
Re: Unknown unit type error
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...
Probably you have been working with diffrent id's for different scenarios. Maybe you should check your scenarios for that...