okay. I was unsure what exactly you meant by "not the problem lower down". It could mean not the problem at the lower part. Or if you were lazy and omitted a comma, what you wanted to say could have been "not the problem, lower down", which refers to the text lower down in the post.
As for the question itself, I can't tell without taking a look at your code, something I'm not really motivated to do (finding it, download, untar, open the source in an editor, figure out the structure and then find out what you did before that was not working and compare that with your current solution).
AI Question: get event name
Moderator: OpenTTD Developers
Re: AI Problem: Something - I'm not sure what...
My OpenTTD contributions (AIs, Game Scripts, patches, OpenTTD Auto Updater, and some sprites)
Junctioneer (a traffic intersection simulator)
Junctioneer (a traffic intersection simulator)
Re: AI Question: get event name
bump!
question:
is there an easy way of getting the event name (print to debug)
i can do it like...
but that seems a little excessive
is there another way?
or is this a feature request?
question:
is there an easy way of getting the event name (print to debug)
i can do it like...
Code: Select all
case 1: EVENT_###
case 2:EVENT_2###
....
is there another way?
or is this a feature request?

AroAI - A really feeble attempt at an AI
It is practically impossible to teach good programming to students that have had a prior exposure to BASIC: as potential programmers they are mentally mutilated beyond hope of regeneration. --Edsger Dijkstra
It is practically impossible to teach good programming to students that have had a prior exposure to BASIC: as potential programmers they are mentally mutilated beyond hope of regeneration. --Edsger Dijkstra
Re: AI Question: get event name
I think this is indeed a feature request...
I haven't tried it myself, but I think you could do it by creating an array of strinds containing the names, while the event type constants are the indexes. It may require quite a bit of work to create the string array, but then printing it would be easy:

I haven't tried it myself, but I think you could do it by creating an array of strinds containing the names, while the event type constants are the indexes. It may require quite a bit of work to create the string array, but then printing it would be easy:
Code: Select all
AILog.Info(eventname[event.GetEventType()]);
// or maybe
AILog.Info(GetEventName(event.GetEventType())); // a bit nicer, but needs an extra function
Who is online
Users browsing this forum: No registered users and 8 guests