Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

AI: Lack of RegisterAI in info.nut is not reported with enabled debug console #5317

Closed
DorpsGek opened this issue Oct 6, 2012 · 3 comments
Closed
Labels
component: AI/Game script (squirrel) This issue is related to Squirrel (Scripting language) enhancement Issue would be a good enhancement; we accept Pull Requests! flyspray This issue is imported from FlySpray (https://bugs.openttd.org/) good first issue Good for newcomers

Comments

@DorpsGek
Copy link
Member

DorpsGek commented Oct 6, 2012

Kogut opened the ticket and wrote:

Lack of RegisterAI in info.nut is not reported with enabled debug console

tested in r24563

Example of info.nut

 class TEST extends AIInfo {
   function GetAuthor()      { return "Kogut"; }
   function GetName()        { return "TEST"; }
   function GetDescription() { return "Test AI"; }
   function GetVersion()     { return 1; }
   function GetAPIVersion() { return "1.2"; }
   function CreateInstance() { return "TEST"; }
   function GetShortName()   { return "TEST"; }
   function GetDate()        { return "2012-10-1"; }
 }
 
     function GetSettings() {
 }

And main.nut for example AI

 function TEST::Start()
 {
 }

Reported version: trunk
Operating system: All


This issue was imported from FlySpray: https://bugs.openttd.org/task/5317
@DorpsGek
Copy link
Member Author

Yexo wrote:

OpenTTD will not report an error on an empty info.nut either, simply because there is no scripting error in there. Calling RegisterAI() is required to let OpenTTD know about your AI, but the fact it's absent is not an error. Would still be nice to get some better diagnostics about errors in info.nut, including missing RegisterAI().


This comment was imported from FlySpray: https://bugs.openttd.org/task/5317#comment11618

@DorpsGek DorpsGek added flyspray This issue is imported from FlySpray (https://bugs.openttd.org/) enhancement component: AI/Game script (squirrel) This issue is related to Squirrel (Scripting language) labels Apr 7, 2018
@TrueBrain
Copy link
Member

Should be relative easy to notice that after the info.nut, the amount of registered AIs didn't change.

@TrueBrain TrueBrain added good first issue Good for newcomers enhancement Issue would be a good enhancement; we accept Pull Requests! and removed enhancement from FlySpray labels Apr 14, 2018
@andythenorth
Copy link
Contributor

Thanks for this. There's been no activity on this for some time, and as it stands, it doesn't look likely that it will go any further. I'm closing it as we try to keep the issue count low for OpenTTD, it helps us focus on things that are important and fun. Feel free to discuss in irc or request re-opening if you disagree. Thanks for contributing!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component: AI/Game script (squirrel) This issue is related to Squirrel (Scripting language) enhancement Issue would be a good enhancement; we accept Pull Requests! flyspray This issue is imported from FlySpray (https://bugs.openttd.org/) good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

3 participants