A more idiomatic way to write this might be:

```
local dist = Game.system and string.format("%.2f", Game.system:DistanceTo(mission.location)) or "???"
```