//There is working icon and icon_state assignments here
var/icon/modifiedIcon = icon(icon,icon_state)

switch (myPlanetSize)

if (1)
modifiedIcon = modifiedIcon.Scale(96,96) // 3 distance across
if (2)
// Nothing, already 160x160 by default
if (3)
modifiedIcon = modifiedIcon.Scale(224,224) // 7 distance across
if (4)
modifiedIcon = modifiedIcon.Scale(288,288) // 9 distance across
if (5)
modifiedIcon = modifiedIcon.Scale(352,352) // 11 distance across
DebugMsg("myPlanetSize out of expected range.")
modifiedIcon = icon(icon,icon_state)

icon = modifiedIcon

Size 2 (no change to scale) works fine.

In the rest of the cases (assuming not "else") the icon simply vanishes.

This is on a proc in a standard obj.
Instead of
modifiedIcon = modifiedIcon.Scale(96,96) // 3 distance across

Try doing:

Do the same for all the other cases.
In response to Rotem12
That worked marvelously. Thanks much!

I guess my lesson there is that icon transformation procs such as .Scale() do not return anything, they just modify the existing icon.

I tell you, take 6 months off from coding and the things you have to relearn. ;P