Is it a known body? Which one are you trying it with?
I've only tried it with 2 or 3 and in each case the name was [SystemName] # where [SystemName is the name of the system and # is the number of the planet. Something BD-14 3326 4 d. Don't know if it's a known planet, but that one has a base on it so I would suspect it is known. But the gravity info was still absent. And the name of the body is present. But the gravity information isn't. I'm thinking the following code would be better.
Code:
{set body to BodyDetails(event.body, event.system)}
{if !body.name || body.name = "":
No data available on this planet, Commander.
|else:
{if body.landable:
{if body.gravity:
{if body.gravity > 4:
Danger: {P(body.name)} is an extremely high gravity world, at {body.gravity} G.
|elif body.gravity > 2:
Caution: {P(body.name)} is a high gravity world, at {body.gravity} G.
|elif body.gravity > 0.5:
Warning: {P(body.name)} is a medium gravity world, at {body.gravity} G.
|else:
{P(body.name)} is a low gravity world, at {body.gravity} G.
}
}
}
}
Last edited: