Im a new develepor need help with code! (C#)

Hi!
Im developing a game to have fun with my friends and subscribers on youtube.
I need help…
These are the errors:


And heres the script code (setting up multiplayer with photon):

using UnityEngine;
using System.Collections;

public class NetworkManager : Photon.MonoBehaviour {

	// Use this for initialization
	void.Start () (
		PhotonNetwork.ConnectUsingSettings("alpha 0.1");
	}
	
	void.OnGUI() {
		GUILayout.Label (PhotonNetwork.connectionStateDetailed.ToString());
	}
	
	void OnJoinedLobby() (
		PhotonNetwork.JoinRandomRoom();
	}
	
	void OnPhotonRandomJoinFailed() (
		PhotonNetwork.CreateRoom(null);
	}
	
	void OnJoinedRoom() (
		GameObject Player = PhotonNetwork.Instantiate ( "Player", Vector3.zero, Quaternion.identity, 0 );
	}
}

You’re using ( instead of { on a lot of your opening brackets for your methods. You should also remove the period between void and Start/OnGUI

For example, Line 7:

void.Start () (

should be

void Start () {

fixed some but still got those:

Ignore this one, dont know how to remove it (the picture with 5 errors)

You didn’t fix all the errors.
Lines 11, 15, 19 and 23 all have errors on them.
Remove the period after void before OnGUI and replace the opening “(” at the end of each of the lines I mentioned with a {

Edit:
From your new picture it seems you still have to fix the error on line 15.
Replace the ( with a {
Remember, when defining a method/class always use “curly brackets

void.Start() and void.OnGui() should be

void Start()
void OnGui()

this declares a function
void is used to declare the type of function

the ‘.’ is used to call properties and methods that an object has access to.
eg.
PhotonNetwork.Instantiate
// PhotonNetwork is an object
// Instantiate() is a method the above object has access to and thus can call

if what I told you is brand new to you, I would suggest going through unity’s tutorial series on scripting in C#

I understand the urge to want to get straight to work, but taking the time to study the language will save a lot of time and frustration.

Oh okay thanks!

Yeah thanks fixed it, but now when im joining a game with my friend we can’t see each other and we’re getting under the platform/terrain :confused:
If you can help that would be really great :slight_smile: