none
Somebody Pls Help!!!!! What Did I Did Wrong?! Pls Help!

    Question

  • What Did I Did Wrong? Error is :     CS0029    Cannot implicitly convert type 'string' to 'bool'  
    I Need Help!

    using UnityEngine;

    public class Cool : MonoBehaviour {
        public GameObject Stone;
        // Use this for initialization

        // Update is called once per frame

        private void OnCollisionEnter(Collision col)
        {
            Debug.Log("Collision");
            if (col.gameObject.tag = "Kimy") {
                Destroy(col.gameObject);
            }
        }
    }

    Tuesday, November 13, 2018 8:20 PM

All replies

  • Hi Kimy1234_5,

    Without the whole demo, it is hard for me to find the real reason.

    Could you debug your app and make sure that which line code get this warning or error?

    You would check that which variable generated this issue in your side. 

    https://docs.microsoft.com/en-us/dotnet/csharp/language-reference/compiler-messages/cs0029

    If still no help, it would be better if you could share a simple demo with one drive.

    Best Regards,

    Jack


    MSDN Community Support
    Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.

    Friday, November 16, 2018 3:25 AM
    Moderator