error CS1002: ; expected

need help , i’m a totally beginner for c# and unity too .
i did exactly the same in tutorial, but unity just tell me that my script cant work .
could anyone help me ?

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

public class Waypoints : MonoBehaviour{
   
    public static Transform[] points;

    void Awawke ()
    {
        points = new Transform[transform.childCount];
        for (int i = 0; i < points.Length; i++)
        {
            points[i] = transform.GetChild(i)
        }
    }
}

and I really dont know how to debug C#, cause for debuging python in VScode , it’s so easy to do that , but i have no clue what i can do for C#.

Missing semicolon in line 14, just like the compiler told you.

Edit:
Wow, i totally missed the Awawke…

1 Like

Also, I think you want to change the name Awawke to Awake. Unity will look for a method called Awake in your monobehaviour and automatically run it, so I assume that’s what the tutorial writer was going for. A method called Awawke will not automatically run.

1 Like

points = transform.GetChild(i);

1 Like

oh, Great ! thanks a lot guys !
Could i have any suggestion for debugging the C#?
I mean , like paython , i could just simply click


but for c#… i really didn’t find a simple way to do it .

Did the suggestions work? Tips for new Unity users

1 Like