LuaSurface::find_entities_filtered has unexpected interactions with empty table arguments
Posted: Sat Oct 14, 2023 7:02 pm
I recently encountered a bug where I was passing an empty table ({}) to the name argument of LuaSurface::find_entities_filtered in my mod Drills of Drills.
This had some unexpected, but not incomprehensible, undocumented behavior (though it did take me three versions of the mod to pin down what was happening) where the function ignored the argument entirely, rather than treating it as a list of zero allowed values and finding nothing.
I think this should probably be noted on the array-accepting arguments to save others the headache in the future.
This had some unexpected, but not incomprehensible, undocumented behavior (though it did take me three versions of the mod to pin down what was happening) where the function ignored the argument entirely, rather than treating it as a list of zero allowed values and finding nothing.
I think this should probably be noted on the array-accepting arguments to save others the headache in the future.