This has only just started since I added this little test function but you can see the message "Kai Started" appears after the message about towns in my Test function.
Does anyone know why this might be happening?
EDIT::
Now I'm really confused. I tried positioning the call to Test() in different points in the code (with a few sleep commands) just to try and see what was going on. Anyway I tried putting it after the while(true) loop and it still executes the call. I even exited and reopened openttd to make sure it was getting loaded correctly.
Anybody have a clue here?
AILog.Info messages getting printed out of order?
Moderator: OpenTTD Developers
Re: AILog.Info messages getting printed out of order?
What happens if you remove the semicolon at the first line of your Test-function
Code: Select all
function Kai::Test(); // <--- remove this semicolon
{
// ...
}
My OpenTTD contributions (AIs, Game Scripts, patches, OpenTTD Auto Updater, and some sprites)
Junctioneer (a traffic intersection simulator)
Junctioneer (a traffic intersection simulator)
Re: AILog.Info messages getting printed out of order?
lol. I actually just discovered that like 2 minutes ago. All is fine. I'm such an idiotZuu wrote:What happens if you remove the semicolon at the first line of your Test-function
Code: Select all
function Kai::Test(); // <--- remove this semicolon { // ... }

Cheers for your help
Re: AILog.Info messages getting printed out of order?
The squirrel language allow many constructions like this one which compiles but doesn't make sense. Working on a Squirrel parser, I found many ambiguities in the grammar all of them can give a situation like yours. The ambiguites are (of course) not documented in the squirrel manual. (You have to test against the official compiler to discover what a given statement could be actually doing.) The problem is in general hard to spot which makes developping in Squirrel a bit harder. (or funnier ?)kirky_D wrote:I'm such an idiot
Who is online
Users browsing this forum: No registered users and 7 guests