QuantumMan345
New member
- Joined
- Feb 10, 2021
- Messages
- 2
- Programming Experience
- Beginner
For some reason, whenever I try to run the code below, it gives me these two errors:
Compilation error (line 17, col 3): } expected
Compilation error (line 43, col 1): Member definition, statement, or end-of-file expected
I am not sure about the first one, since I counted and the right amount of brackets are there and I don't understand what the second one is saying.
Compilation error (line 17, col 3): } expected
Compilation error (line 43, col 1): Member definition, statement, or end-of-file expected
I am not sure about the first one, since I counted and the right amount of brackets are there and I don't understand what the second one is saying.
C#:
using System;
public bool start = true;
public string Name;
public string Continue;
public bool StartAdventure;
private bool NameEntered;
private double go;
for(go = 1; go < 5; --go)
{
if(start == true)
{
Console.WriteLine("Enter Your Name Here");
Name = String.Copy(Console.ReadLine());
start = false;
NameEntered = true;
}
public class Player
{
public static void Main()
{
}
}
if(NameEntered == true)
{
Console.WriteLine("Is {0:N} Correct? Y/N", Name);
Continue = Console.ReadLine();
NameEntered = false;
}
if(Continue == "y")
{
StartAdventure = true;
}
else
{
start = true;
}
}