Unknown unit type error

The place to post your WML questions and answers.

Moderators: Forum Moderators, Developers

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

Postby Zmoj » June 18th, 2017, 7:39 pm

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 11 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 11 times

_main.cfg
(6.16 KiB) Downloaded 13 times


Sorry if I made a mistake since I'm new to doing this.
Zmoj
 
Posts: 11
Joined: October 6th, 2012, 6:04 pm

Re: Unknown unit type error

Postby Bitron » June 18th, 2017, 8:16 pm

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.
User avatar
Bitron
Moderator
 
Posts: 296
Joined: October 19th, 2015, 9:23 am
Location: Germany

Re: Unknown unit type error

Postby Zmoj » June 19th, 2017, 11:55 am

Wow, it was simple as that. Dumb me.

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

Re: Unknown unit type error

Postby Zmoj » June 20th, 2017, 11:40 am

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.
Zmoj
 
Posts: 11
Joined: October 6th, 2012, 6:04 pm

Re: Unknown unit type error

Postby zookeeper » June 20th, 2017, 11:48 am

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.
User avatar
zookeeper
WML Wizard
 
Posts: 9514
Joined: September 11th, 2004, 10:40 pm
Location: Finland

Re: Unknown unit type error

Postby Zmoj » June 20th, 2017, 3:19 pm

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?
Zmoj
 
Posts: 11
Joined: October 6th, 2012, 6:04 pm

Re: Unknown unit type error

Postby zookeeper » June 20th, 2017, 3:36 pm

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
zookeeper
WML Wizard
 
Posts: 9514
Joined: September 11th, 2004, 10:40 pm
Location: Finland


Return to WML Workshop

Who is online

Users browsing this forum: No registered users and 3 guests