IP too uint

I need a uint as ip adres for the steamworks master server.
this is my go at it but Join is throwing a compile error.

    var rgIp 	:String[] 	= Network.player.ipAddress.Split("."[0]);     
	var sIp 	:String		= rgIp.Join();
	var iIp		:uint		= parseInt(sIp);
	Debug.Log(iIp);

How do I join the string array into a single string?

If you want an ip address as uint you have to merge it’s byte components. See this SO question for multiple solutions.

i usually write c# but this should do it for you.

var address : uint = 0;

for (i : int = 3; i >= 0; i--)
{
    address |= parseInt(rgIp[3-i]) << (i * 8);
}

EDIT: wot Bunny83 said :wink:

Use a loop to add them all together

var sIp : String = "";
for (i : int = 0; i < rgIP.Length; i++){
    sIp += rgIp *;*

}