Forums » Bugs

GetHomeStation()

Mar 20, 2011 meridian link
GetHomeStation() returns the sectorid of where you are homed when it probably should return the stationid. Converting a stationid to a sectorid is easy but going the other way... not so much.

As of now you can can assume that the player is homed at the first stationid for the sector:
stationid = (GetHomeStation() or 0)*256+1

But this will be an issue if a sector ever has more than one station (excluding cap ships, of course).
Mar 20, 2011 raybondo link
Yes, that's a known issue that I've been needing to change for the last 8 years. It was a design flaw from way back.