Basic networking script

I need help, I can’t find my error. Could it just be my network doesn’t allow me to host? But shouldn’t I be able to connect to my own IP address as well? Anyways I can’t get the error I tried several thing. Can someone come help, very new to networking.

var spawnPoint: Transform;
var gameName: String;

private var refreshing: boolean;
private var hostData: HostData[];

function Start () {
 gameName = "This_Pirate_Game_Rocks_12";

function Update () {
	if (!Network.isClient) {
		Debug.Log("Refreshing List");
		if (refreshing) {
			hostData = MasterServer.PollHostList();
			Debug.Log("Getting hostData");
			if (hostData) {
				if (hostData.Length <= 0) {
					Debug.Log("No sever found. Starting sever.");
				else {
					Debug.Log("You're connect to the server!");


function spawnPlayer() {
	Network.Instantiate(playerPrefab, spawnPoint.position, Quaternion.identity, 0);

function startServer() {
	Network.InitializeServer(32,25001, !Network.HavePublicAddress);
	MasterServer.RegisterHost(gameName, "Wonderful Pirate Game", "HI");
	Debug.Log("Created server!");

function refreshHostList() {
	refreshing = true;

function OnConnectedToServer() {

I put debug log codes in and everything is running. But I’m not sure what the error is.
The last line of code which is access is this one

and it returns 0 every time so I am taking a guess and it isn’t initializing my server.

Help please? Thanks.

remplace the line MasterServer.RegisterHost(gameName, "Wonderful Pirate Game", "HI"); with this and test

“Wonderful_Pirate”, “l33t game for