What happens if you pass the name of a system like "Inzaan", which there a two planets with the same name in G8systemIDForName
function systemIDForName(systemName : String) : Integer
Returns the ID number of a system in the current galaxy based on the system name)
systemIDForName What about duplicate names?
Moderators: winston, another_commander, Getafix
- Okti
- ---- E L I T E ----
- Posts: 700
- Joined: Sun Sep 26, 2010 1:51 pm
- Location: A GH shop, near witchpoint to Oresrati in Galaxy 8
systemIDForName What about duplicate names?
According to Wiki=
- Commander McLane
- ---- E L I T E ----
- Posts: 9520
- Joined: Thu Dec 14, 2006 9:08 am
- Location: a Hacker Outpost in a moderately remote area
- Contact:
Re: systemIDForName What about duplicate names?
Why don't you just try it in the console:Okti wrote:According to Wiki=
What happens if you pass the name of a system like "Inzaan", which there a two planets with the same name in G8systemIDForName
function systemIDForName(systemName : String) : Integer
Returns the ID number of a system in the current galaxy based on the system name)
Code: Select all
> System.systemIDForName("Inzaan")
22
Note that Inzaan is the only case of two planets with the same name in the same galaxy. So scripters should be aware of the exception.
- JensAyton
- Grand Admiral Emeritus
- Posts: 6657
- Joined: Sat Apr 02, 2005 2:43 pm
- Location: Sweden
- Contact:
Re: systemIDForName What about duplicate names?
It searches through the planet IDs from 0 to 255 and returns the first match. (It’s also laughably inefficient.) Docs updated.
E-mail: [email protected]