Leader not found (what does this log entry mean?)

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
User avatar
Straff
Posts: 124
Joined: September 27th, 2020, 2:53 pm

Leader not found (what does this log entry mean?)

Post by Straff »

log wrote: 20241124 09:19:20 warning ai/ca/testing_ai_default: Leader not found
20241124 09:19:20 warning ai/ca/testing_ai_default: Leader not found
20241124 09:19:21 warning ai/ca/testing_ai_default: Leader not found
20241124 09:19:21 warning ai/ca/testing_ai_default: Leader not found
20241124 09:19:21 warning ai/ca/testing_ai_default: Leader not found
20241124 09:19:21 warning ai/ca/testing_ai_default: Leader not found
20241124 09:19:21 warning ai/ca/testing_ai_default: Leader not found
20241124 09:19:21 warning ai/ca/testing_ai_default: Leader not found
20241124 09:19:21 warning ai/ca/testing_ai_default: Leader not found
20241124 09:19:25 warning ai/ca/testing_ai_default: Leader not found
20241124 09:19:25 warning ai/ca/testing_ai_default: Leader not found
20241124 09:19:25 warning ai/ca/testing_ai_default: Leader not found
20241124 09:21:05 warning ai/ca/testing_ai_default: Leader not found
20241124 09:21:05 warning ai/ca/testing_ai_default: Leader not found
20241124 09:21:06 warning ai/ca/testing_ai_default: Leader not found
20241124 09:21:06 warning ai/ca/testing_ai_default: Leader not found
20241124 09:21:06 warning ai/ca/testing_ai_default: Leader not found
20241124 09:21:06 warning ai/ca/testing_ai_default: Leader not found
20241124 09:21:06 warning ai/ca/testing_ai_default: Leader not found
20241124 09:21:06 warning ai/ca/testing_ai_default: Leader not found
20241124 09:21:06 warning ai/ca/testing_ai_default: Leader not found
20241124 09:21:06 warning ai/ca/testing_ai_default: Leader not found
20241124 09:21:11 warning ai/ca/testing_ai_default: Leader not found
20241124 09:21:11 warning ai/ca/testing_ai_default: Leader not found
20241124 09:21:11 warning ai/ca/testing_ai_default: Leader not found
20241124 09:22:59 warning ai/ca/testing_ai_default: Leader not found
20241124 09:22:59 warning ai/ca/testing_ai_default: Leader not found
20241124 09:22:59 warning ai/ca/testing_ai_default: Leader not found
20241124 09:23:00 warning ai/ca/testing_ai_default: Leader not found
20241124 09:23:00 warning ai/ca/testing_ai_default: Leader not found
20241124 09:23:00 warning ai/ca/testing_ai_default: Leader not found
20241124 09:23:00 warning ai/ca/testing_ai_default: Leader not found
20241124 09:23:06 warning ai/ca/testing_ai_default: Leader not found
20241124 09:23:06 warning ai/ca/testing_ai_default: Leader not found
20241124 09:23:06 warning ai/ca/testing_ai_default: Leader not found
20241124 09:24:46 warning ai/ca/testing_ai_default: Leader not found
20241124 09:24:46 warning ai/ca/testing_ai_default: Leader not found
20241124 09:24:46 warning ai/ca/testing_ai_default: Leader not found
...
and there are much more lines about a missing leader
All leaders are there, what leader is not found? The scenario works like a charm, only thing is this annoying log entry the complete log file. I don't understand why the log is complaining about a missing leader. Can anybody help me to get rid of this annoying log entry?
User avatar
Straff
Posts: 124
Joined: September 27th, 2020, 2:53 pm

Re: Leader not found (what does this log entry mean?)

Post by Straff »

Thank you for the answer Ravana. Sadly I have no idea what that piece of code does, nor how I can change my scenario's code so that the log entry "leader not found" no longer appears in the log file.
User avatar
octalot
General Code Maintainer
Posts: 818
Joined: July 17th, 2010, 7:40 pm
Location: Austria

Re: Leader not found (what does this log entry mean?)

Post by octalot »

IIUC, your WML has a [side][ai][leader_goal] for that side.
User avatar
Straff
Posts: 124
Joined: September 27th, 2020, 2:53 pm

Re: Leader not found (what does this log entry mean?)

Post by Straff »

That hint was very helpful, thank you very much Octalot.

I added

Code: Select all

auto_remove=yes
to all instances of

Code: Select all

[leader_goal]
, and voila the annoying log entry is gone.
Great, thank you both for your help. :D
gfgtdf
Developer
Posts: 1452
Joined: February 10th, 2013, 2:25 pm

Re: Leader not found (what does this log entry mean?)

Post by gfgtdf »

the (c++ from ravanas link) code is still strange tho, firstly it _seems_? to even give this warning if the leader has no moves left which on first sight seems to be a common sceanrio that shouldnt give a warning, also in case that there are actually no leaders the warning is not given since it returns before in the (leaders.empty()) line.
Scenario with Robots SP scenario (1.11/1.12), allows you to build your units with components, PYR No preperation turn 1.12 mp-mod that allows you to select your units immideately after the game begins.
User avatar
Straff
Posts: 124
Joined: September 27th, 2020, 2:53 pm

Re: Leader not found (what does this log entry mean?)

Post by Straff »

I think the log entries did appear after the leaders had reached their leader_goal. (in my scenario are multiple leaders with [leader_goal])
gfgtdf
Developer
Posts: 1452
Joined: February 10th, 2013, 2:25 pm

Re: Leader not found (what does this log entry mean?)

Post by gfgtdf »

hmm did allthe warnign disapearor after you added auto_remove or is it judt less spammy?
Scenario with Robots SP scenario (1.11/1.12), allows you to build your units with components, PYR No preperation turn 1.12 mp-mod that allows you to select your units immideately after the game begins.
User avatar
Straff
Posts: 124
Joined: September 27th, 2020, 2:53 pm

Re: Leader not found (what does this log entry mean?)

Post by Straff »

All those log entry's are gone now.


EDIT: After some more testing, not all entry's are gone.
Post Reply