This is my error “Assets\skrypt\menuglowne.cs(9,12): error CS1519: Invalid token ‘=’ in class, struct, or interface member declaration”
This is my script (coded in Visual Studio 2019 and some things is in polish because this is my motherland language
)
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
///
/// Skrypt odpowiadający za łączenie się z serwerem (oraz rozłączenie się i utratę połączenia)=
///
public class menadzerpolaczen : MonoBehaviour{}
void Start() {
}
void Update() {
}
public void Polacz() {
PhotonNetwork.ConnestUsingSettings(“TRAOE 1.0v”);
}
void OnGUI() {
GUI.Label(new Rect(0, 0, 100, 20), PhotonNetwork.connectionStateDetailed.ToString());
}
Please use code tags: Using code tags properly
How to report your problem productively in the Unity3D forums:
http://plbm.com/?p=220
2 Likes
As mentioned, use code tags. But, I’ll give you a hint. {}
You should be able to look at any other script and compare to spot your error. 
1 Like
May I suggest that you reconsider this? If you need help regularily or share your code (team, opensource) most people will be unable to help or use it since they don’t know polish. You are forced to us english names for API methods anyway. So it’s just more coherent and comprehensible when your own names are in english too. Just train this as a habit and you will learn english better too. I’m from germany and wrote my code in german in the beginning too. But one day I realised “it sucks” this way. Now I do everything in english and just a comment here and there is in german.
And Brathnann is correct with the cause of the error. Your IDE should help you with this kind of errors too. In this case the error message is a bit misleading but in general the error message describes pretty well what is wrong.
If you have problems with general programming there is a good and free webbook called C# yellow book. Personally I find it easier to learn C# programming and game programming in Unity separately.
Also when you are just beginning to learn programming it is “unwise” to start with a multiplayer project. Do some tutorials of simple games first to get a grasp of how Unity works, Multiplayer adds a huge layer of complexity which you definitely don’t want to start with.
1 Like