Why do i get this error one one call but not the other: CS0120: An object reference is required to a

I have a module public GameObject FlipCardAndUpdatedMasterList(GameObject cardToFlip_GO) { that i successfully call from different modules in the same script.

This is an example of that:

if (selected_GameObject.tag != "Dummy_GameObject")
                                selected_GameObject = FlipCardAndUpdatedMasterList(selected_GameObject);

When i try to call with the following code (below), from another function in the same script i get the following error:CS0120: An object reference is required to access non-static member `GameEngine_Script.FlipCardAndUpdatedMasterList(UnityEngine.GameObject)'

List<GameObject> myList = new List<GameObject> (Singleton.Instance.master_GameObject_List);

        foreach (GameObject aGO in myList) {
      
            // Check if back is up and fix if needed
            if (aGO.tag.LastIndexOf ("B") == -1) { // Back is up

            } else {
                GameObject myGO = FlipCardAndUpdatedMasterList(aGO);
            }
      
        }

Could someone please explain what is wrong and what the difference is?

I can’t really see what’s going on in the rest of your code but my guess is that one function is a static function (the one that gives the error) and the function that is actually working isn’t a static function.

i am a nOOb, you are correct :slight_smile: thanks