[Solved] My leader cannot recruit

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
TarwWik
Posts: 3
Joined: June 9th, 2017, 1:59 pm

[Solved] My leader cannot recruit

Post by TarwWik »

Hi everyone

First of all, as a French guy, I apologise for my english ^^'
I don't know where I should post my message, sorry if it's the wrong place.

It's the first time I'm developing a campaign, and there is one problem I don't know how to solve. I can't recruit with my human leader. Ctrl+R and right-click+Recruit do nothing at all, don't even display an error message.
After reading some other topics, I changed "controller=human" to "controller=ai". I have now an error message that I don't really understand. It says : "Unit-type "null" doesn't exist". But this is what my code looks like :

Code: Select all

[side]
    side=1
    x,y=4,18
    controller=human
    type=Peasant
    id=azerty
    team_name=azerty
    user_team_name="Azerty"
    save_id=Player
    canrecruit=yes
    recruit="Peasant,Woodsman"
    controller=ai
    fog=no
    shroud=no
    [/side]
I've tried to change what is after recruit= but it's all the same.

Thank you for your help.
TarwWik'
Last edited by TarwWik on June 9th, 2017, 6:34 pm, edited 1 time in total.
I never knew what a martyr was
I still don't
User avatar
Pentarctagon
Project Manager
Posts: 5564
Joined: March 22nd, 2009, 10:50 pm
Location: Earth (occasionally)

Re: [New Campaign] My leader cannot recruit

Post by Pentarctagon »

Moved to the WML Workshop.
99 little bugs in the code, 99 little bugs
take one down, patch it around
-2,147,483,648 little bugs in the code
User avatar
Ravana
Forum Moderator
Posts: 3000
Joined: January 29th, 2012, 12:49 am
Location: Estonia
Contact:

Re: [New Campaign] My leader cannot recruit

Post by Ravana »

This means that your recruit list includes unit with type that is not known.
TarwWik
Posts: 3
Joined: June 9th, 2017, 1:59 pm

Re: [New Campaign] My leader cannot recruit

Post by TarwWik »

I've just verified. Both Peasant and Woodsman are right. And when I tried to change the units on the recruit list, I got the same error.
I never knew what a martyr was
I still don't
User avatar
Bitron
Developer
Posts: 453
Joined: October 19th, 2015, 9:23 am
Location: Germany

Re: [New Campaign] My leader cannot recruit

Post by Bitron »

Note that you have controller two times in the [side] tag. First is human, second is ai.
User avatar
Ravana
Forum Moderator
Posts: 3000
Joined: January 29th, 2012, 12:49 am
Location: Estonia
Contact:

Re: [New Campaign] My leader cannot recruit

Post by Ravana »

Savefile would be useful.
User avatar
WhiteWolf
Forum Moderator
Posts: 769
Joined: September 22nd, 2009, 7:48 pm
Location: Hungary

Re: [New Campaign] My leader cannot recruit

Post by WhiteWolf »

Controller means who commands the given side. Side 1 is typically the player, so it should be controller=human. You currently have defined the controller twice - this is causing the error. Delete controller= ai from the code, and it should work.
A note: it can lead to recall problems if save_id is not the same as id. If you' re not sure what save_id means, omit it, you don't need it. :)
Main UMC campaigns: The Ravagers - now for 1.16, with new bugs!
Old UMC works: The Underness Series, consisting of 5 parts: The Desolation of Karlag, The Blind Sentinel, The Stone of the North, The Invasion Of The Western Cavalry, Fingerbone of Destiny
TarwWik
Posts: 3
Joined: June 9th, 2017, 1:59 pm

Re: [New Campaign] My leader cannot recruit

Post by TarwWik »

WhiteWolf wrote: A note: it can lead to recall problems if save_id is not the same as id. If you' re not sure what save_id means, omit it, you don't need it. :)
I did just that. Now it works. I don't really know why, but thank you anyway :)
I never knew what a martyr was
I still don't
Post Reply