error CS0201

error CS0201: Only assignment, call, increment, decrement, and new object expressions can be used as a statement

I want to edit a string with another script
Script A(NetworkManager) :
public string playerPrefabName = “Car1”;
Script B :
using UnityEngine;
using System.Collections;

public class CarSelectManager : MonoBehaviour {
public GameObject car1;
public GameObject car2;
public GameObject car3;
public GameObject car4;
public GameObject car5;
public GameObject car6;
public GameObject car7;
public GameObject car8;
NetworkManager Manager;

void Start() {
Manager = GameObject.Find (“_Manager”).GetComponent ();

}
void Update() {
if(car1.SetActive (true));
Manager.playerPrefabName = “Car1”;
}

The error on monodevelop is in Manager.playerPrefabName = “Car1”;
Dot between Manager and playerPrefabName
I know it’s prob. a silly error but i’m learning c# by using unity

Oops nevermind error is gone now but it needs to be if(car1.activeSelf not SetActive
but i still dont know why that first error just disappeared

if(car1.SetActive (true));

most likely; SetActive doesn’t return anything, so it’s can’t be used in an if statement like this. You’ve also got a “;” after the if which isn’t going to allow the if to do anything.

you can always just look up the error codes:

thanks i managed to fix everything