News:

Do you need help?
Simutrans Wiki Manual can help you to play and extend Simutrans. In 9 languages.

[r7706] Squirrel API - function tile_x.find_object(x) returning error

Started by HaydenRead, January 05, 2016, 03:45:04 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

HaydenRead

The tile_x.find_object(x) function is returning an error "[No object of requested type on tile (or no tile at this position)]" when searching for an object of type mo_label.

I have not yet tested with other mo_ types with find object.

When there really is no such object, the function correctly returns null.
When there is (or should be) an object, it gives the listed error.

Occuring on Windows 10 x64 computer.

I am attempting to trace the source of the error, but have not yet managed to find the source of the error.

I will also attempt to test other mo_ object types to see if the issue is related only to mo_label, or to all tile_x.find_object(x) calls.

The example call in the scenario.nut file is:
local label=tile_x( 0, 0, 1 ).find_object(mo_label)

Dwachs

thank you for the report. This should be fixed with r7716. I added also a label_x::get_text method.

I am curious, what you are working on.
Parsley, sage, rosemary, and maggikraut.

HaydenRead

Quote from: Dwachs on January 05, 2016, 12:33:16 PM
thank you for the report. This should be fixed with r7716. I added also a label_x::get_text method.
Thanks for the quick response.
Quote from: Dwachs on January 05, 2016, 12:33:16 PM
I am curious, what you are working on.
I am working on a Tutorial Scenario using Pak128 (which is also why I developed the code for the <img > tag).
I am developing it in preparation for the game going on Steam.