how do i fix Assets\Scripts\Hello_World.cs(10,27): error CS1002: ; expected

as I add a hello world script

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

public class Hello_World : MonoBehaviour
{
// Start is called before the first frame update
void Start()
{
Print(Hello_World)
}

// Update is called once per frame
void Update()
{

}
}

I cant actually test it be unity is saying the copiler issues have to be fix
Please help.

Please use code tags .

In C#, you need a semicolon at the end of every executable code statement; for instance, after “Print(Hello_World)” inside of your Start() method.

That is probably not the only error in your script. Instead of “Print”, I think you meant to use either “print” (lowercase) or “Debug.Log”. Also you probably meant to print a string rather than a typename, which means you need to put quotation marks around the text you want to print.

In computer programming, you generally need to write things exactly perfect or they just won’t work at all. If you’re new to programming, I suggest you find and follow a tutorial with explicit examples.

1 Like

Unity told you the error. On line 10, character position 27, there is a missing semicolon.

2 Likes

well now its saying that the Hello world is a type?/

In your code editor it should be showing you exactly where the problem is (probably a red squiggle under it) before you even save the code, and before you switch back to Unity. Fix everything before even bothering to switch back to Unity.

Whatever tutorial you are doing, pay more attention to the exact syntax. In programming you have to get syntax EXACTLY correct.

Ok my issues have been resolved for now thxs for the help everyone