[Rseding91] [1.0.0] Mod API: when a unit group with zero members receives the command build_base a crash/hang occurs
Posted: Sun Aug 23, 2020 7:47 am
When a unit group with zero members receives a command of type defines.command.build_base a crash (well, moreso the game just hangs) occurs. I've attached my log (although probably not applicable here) and a mod for demonstration purposes. This should work independent of save, so none attached. Just ensure water isn't at x=10, y=10. (not sure if that'd cause an error, but just in case...)
Place down your starting furnace and the script works as the unit group has at least one member, however when you mine it again it crashes as the unit group has no members.
I think I could've done that with console commands, but don't know how, sorry.
This isn't a bug per-say, I suppose, however having some sort of logging when this occurs would be nice... or maybe have set_command return false? I dunno. Don't usually make mods, so don't know what would work best. Just some sort of notification of what's going wrong would be nice, spent a good half day trying to figure out what was causing my game to crash.
Originally found when using rampant, however found independent of all mods besides my test one.
Place down your starting furnace and the script works as the unit group has at least one member, however when you mine it again it crashes as the unit group has no members.
I think I could've done that with console commands, but don't know how, sorry.
This isn't a bug per-say, I suppose, however having some sort of logging when this occurs would be nice... or maybe have set_command return false? I dunno. Don't usually make mods, so don't know what would work best. Just some sort of notification of what's going wrong would be nice, spent a good half day trying to figure out what was causing my game to crash.
Originally found when using rampant, however found independent of all mods besides my test one.