Search Unity

So I just started learning and I need some help

Discussion in 'Scripting' started by EpiclyPlayed, Jul 24, 2021.

  1. EpiclyPlayed

    EpiclyPlayed

    Joined:
    Jul 23, 2021
    Posts:
    1
    I just started about yesterday and I did whats shown in the picture. Can a more experienced programmer explain to me whats wrong with this?
     

    Attached Files:

  2. Kurt-Dekker

    Kurt-Dekker

    Joined:
    Mar 16, 2013
    Posts:
    38,742
    Welcome to the Unity3D forums.

    Please be advised that screenshots of code are not helpful.

    How to report your problem productively in the Unity3D forums:

    http://plbm.com/?p=220

    How to understand compiler and other errors and even fix them yourself:

    https://forum.unity.com/threads/ass...3-syntax-error-expected.1039702/#post-6730855

    If you post a code snippet, ALWAYS USE CODE TAGS:

    How to use code tags: https://forum.unity.com/threads/using-code-tags-properly.143875/

    WHEN YOU HAVE ERRORS,

    Remember: NOBODY memorizes error codes. The error code is absolutely the least useful part of the error. It serves no purpose at all. Forget the error code. Put it out of your mind.

    The complete error message contains everything you need to know to fix the error yourself.

    Always start with the FIRST error in the list, as sometimes that error causes or compounds some or all of the subsequent errors.

    The important parts of the error message are:

    - the description of the error itself (google this; you are NEVER the first one!)
    - the file it occurred in (critical!)
    - the line number and character position (the two numbers in parentheses)

    All of that information is in the actual error message and you must pay attention to it. Learn how to identify it instantly so you don't have to stop your progress and fiddle around with the forum.
     
    exiguous likes this.
  3. exiguous

    exiguous

    Joined:
    Nov 21, 2010
    Posts:
    1,749
    Here you go.
    What that means is, when you have issues with BASIC C# syntax, you should learn this first. The above free ebook will help you with that. I find it advisable to learn the basics of C# programming outside of Unity (as Unity adds some quirks). When you know how programming in C# works, then do some tutorials for Unity. Then you can start your project. There is little sense to ask the forum for every small syntax error you make (and which the IDE should help you fix anyway). If you want to develop games you have to learn coding. Easy as that. (Beside you want to be pure designer, artist, animator etc.). There are plenty of resources out there to do that. There is little sense for someone to teach you "everything" from scratch.
     
    Kurt-Dekker likes this.