Order flags bug? Unload and wait for (any) full load
Moderator: OpenTTD Developers
Order flags bug? Unload and wait for (any) full load
While playing with order flags, I noticed I can't get my AI to specify AIOrder.AIOF_FULL_LOAD | AIOrder.AIOF_UNLOAD (which, if I understand correctly, should result in the "unload and wait for full load" order). The order isn't added, which presumably means it's invalid. However, through the player interface I can give my vehicles this combination of load flags. Is this a bug or am I doing it wrong?
Re: Order flags bug? Unload and wait for (any) full load
You can check the return value from the function, if it's false, it failed. If the function failed, you can get the error by AIError.GetLastError or a string by AIError.GetLastErrorString. Print that string and you'll see what went wrong.Michiel wrote:While playing with order flags, I noticed I can't get my AI to specify AIOrder.AIOF_FULL_LOAD | AIOrder.AIOF_UNLOAD (which, if I understand correctly, should result in the "unload and wait for full load" order). The order isn't added, which presumably means it's invalid. However, through the player interface I can give my vehicles this combination of load flags. Is this a bug or am I doing it wrong?
Note that I'm not saying it's not a bug, just that you should give some more information.
Re: Order flags bug? Unload and wait for (any) full load
It returns false, and the error is ERR_UNKNOWN, unfortunately.
Re: Order flags bug? Unload and wait for (any) full load
What function are you calling? In case of AppendOrder or InserOrder, are you sure the destination parameter is correct? Those functions return ERR_UNKNOWN when trying to send a bus to a truck stations or a truck to a bus station.
Re: Order flags bug? Unload and wait for (any) full load
Should be solved when the fix for FS#2130 gets synced into NoAI.
Re: Order flags bug? Unload and wait for (any) full load
Nope, I'm sure I got that right It was only when trying to set that combination of flags that it failed.Yexo wrote:What function are you calling? In case of AppendOrder or InserOrder, are you sure the destination parameter is correct? Those functions return ERR_UNKNOWN when trying to send a bus to a truck stations or a truck to a bus station.
CoolRubidium wrote:Should be solved when the fix for FS#2130 gets synced into NoAI.
Who is online
Users browsing this forum: No registered users and 29 guests