Search Unity

help me please. error cs1001 and cs1002

Discussion in 'Scripting' started by zertus, Jun 30, 2020.

  1. zertus

    zertus

    Joined:
    Jun 30, 2020
    Posts:
    5
    hi everyone, I was making up a code for moving a character for a 2D platformer. and I got error cs1002.
    ERROR CS1002 IN THE 24,13 I DONT NOW HOW TO FIX THIS
    here is my code: upload_2020-6-30_22-42-26.png
     
    Last edited: Jun 30, 2020
  2. PraetorBlue

    PraetorBlue

    Joined:
    Dec 13, 2012
    Posts:
    7,911
    Quickly glancing at your screenshot I'd say it probably has to do with the typo you made on line 28. Double check your spelling and capitalization, it has to match exactly.
     
    zertus and Vryken like this.
  3. Vryken

    Vryken

    Joined:
    Jan 23, 2018
    Posts:
    2,106
    You also have a syntax error on line 30 - Forcemode2D value is an incomplete statement:
    rb.AddForce(new Vector2(0, verticalImpulse), Forcemode2D.);
     
    zertus likes this.
  4. zertus

    zertus

    Joined:
    Jun 30, 2020
    Posts:
    5
    I fixed 2 errors cs1001 but error cs1002 remained
     
  5. zertus

    zertus

    Joined:
    Jun 30, 2020
    Posts:
    5
    thank you i fixed every errors but error cs1002 remained
     
  6. Vryken

    Vryken

    Joined:
    Jan 23, 2018
    Posts:
    2,106
    As @PraetorBlue mentioned, please post the error messages when asking for help with errors. Nobody memorizes the error codes.

    Looking this code up - you're missing a semicolon somewhere. It looks like you've deleted the image of your code from your thread, so I can't tell you where that is.
    The error message can though. There will be two numbers separated by a comma at the end of the message. Those numbers indicate the line and character in your script that the error is occurring in respectively.
     
    zertus likes this.
  7. zertus

    zertus

    Joined:
    Jun 30, 2020
    Posts:
    5
    IM EDIT MY THREAD, ADD MORE INFORMATION. thank you
     
  8. Yanne065

    Yanne065

    Joined:
    Feb 24, 2018
    Posts:
    175
    Is else no esle. Line 24
     
    zertus likes this.
  9. zertus

    zertus

    Joined:
    Jun 30, 2020
    Posts:
    5
    thanks