Hi, getting error cs1041 in my code:identifier expected, "this" is a keyword; need solution please

using System.Collections;
using System.Collections.Generic;
using UnityEngine;

public class recurso : MonoBehaviour {

int id;

bool dentrodelradio;

public bool apuntando;

void OnTriggerEnter(Collider other){
	if (other.gameObject.name == "recurso")
		dentrodelradio = true;
	else dentrodelradio = false;
}
// Use this for initialization
void Start () {
	if (this.gameObject.CompareTag("arbol")) {
		int id = 1;

	}
	else if (this.gameObject.CompareTag("carne")) {
		int id = 2;
}
}

// Update is called once per frame
void Update () {
	if (dentrodelradio){ 
		switch(id){
			case 1:
			transform.this.gameObject.tag = "arbolactivo";
			case 2:
			transform.this.gameObject.tag = "carneactivo";
		}
		if (apuntando){
			if (Input.GetMouseButton(0)){
				//ir cambiando la textura con un time delta time y un switch.
			}
		}
	}
		
}

}

You can’t use this like that, either put it before transform (which is redundant as transform without it implies you are talking about this) along with the rest (so the whole this.gameObject.tag), or remove transform.

Transform doesn’t have a property that is this or gameObject.

thanks, think it will work now

Does this work for you:

private int id;
private bool dentrodelradio;
public bool apuntando;

void OnTriggerEnter(Collider other)
{
    if (other.gameObject.name == "recurso")
        dentrodelradio = true;
    else dentrodelradio = false;
}
// Use this for initialization
void Start()
{
    if (this.gameObject.CompareTag("arbol"))
    {
        id = 1;
    }
    else if (this.gameObject.CompareTag("carne"))
    {
        id = 2;
    }
}

// Update is called once per frame
void Update()
{
    if (dentrodelradio)
    {
        if (id == 1)
            this.gameObject.transform.tag = "arbolactivo";
        else if (id == 2)
            this.gameObject.transform.tag = "carneactivo";
        
        if (apuntando)
        {
            if (Input.GetMouseButton(0))
            {
                //ir cambiando la textura con un time delta time y un switch.
            }
        }
    }

}