C# Tutorial 1 questions

Hello, just found this site while browsing the net, thought to give it a try but I am having trouble with the first tutorial.

when I look at the code and then the description and then look back at the code to find the grey area of code that’s supposed to be fine.

I can’t seem to find it at all, any help please?

I am using C# due to wanting to create Rust Oxide plugins.

Thanks in advance.

1 Like
    while true:  while (true)
                 {
    read enemy1:       string enemy1 = Console.ReadLine();
    read dist1:        int dist1 = int.Parse(Console.ReadLine());
    read enemy2:       string enemy2 = Console.ReadLine();
    read dist2:        int dist2 = int.Parse(Console.ReadLine()); 

                      // Write an action using Console.WriteLine()
                      // To debug: Console.Error.WriteLine("Debug messages...");

    print "enemy":   Console.WriteLine("enemy"); 
                   }
1 Like

come on, we need pinned FAQ in onboarding topic
PS and in power of thor too

Thanks, it was not anywhere to be found on how to write it nor, was it in the description

Just to confirm it is like this?

static void Main(string[] args)
    {

// game loop
        while (true)
        {
            string enemy1 = Console.ReadLine(); // name of enemy 1
            int dist1 = int.Parse(Console.ReadLine()); // distance to enemy 1
            
            string enemy2 = Console.ReadLine(); // name of enemy 2
            int dist2 = int.Parse(Console.ReadLine()); // distance to enemy 2

// Write an action using Console.WriteLine()
            // To debug: Console.Error.WriteLine(“Debug messages…”);

print “enemy” " Console.WriteLine(“Buzz”); // replace “enemy” with a correct ship name to shoot

@bvs23bkv33 Dont worry beginners will always ask questions like this :slight_smile: Not to worry cause eventually they will go down the list on the Forum Homepage

Well if there was a better tutorial that explained things a lot better then the questions would not be asked.

That’s some 101 code… try looking for other site that make this kind of programming game and you’ll see this one definitely has the easiest learning curve of all. You have to search at least a little by yourself how to use a variable or conditional statement.

We will not confirm, it’s YOUR job to find out if it’s right or wrong, launch the test, you’ll see if you are right!

I’m not against people who ask help, i’m just against people that don’t know how to search on google, or that don’t even search on this forum the top topic called Onboarding Puzzle Discussion before asking to do their work for them.

Topic closed

1 Like