Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

Coding C# errors HELP!!

Discussion in 'Scripting' started by Ghosts_Riley, Jan 19, 2014.

  1. Ghosts_Riley

    Ghosts_Riley

    Joined:
    Dec 7, 2013
    Posts:
    82
    I'm getting these error codes:

    Assets/Scripts/ColliderExample.cs(17,33): error CS1525: Unexpected symbol `(', expecting `)', `,', `;', `[', or `='

    Assets/Scripts/ColliderExample.cs(54,41): error CS1525: Unexpected symbol `}', expecting `;'

    Assets/Scripts/ColliderExample.cs(62,1): error CS8025: Parsing error

    Here is my code: $Screen Shot 2014-01-18 at 9.38.17 PM.png

    Any help would be greatly appreciated.
     
  2. Minneor

    Minneor

    Joined:
    Nov 5, 2012
    Posts:
    3
    I´m not an Expert, but shouldn´t line 12 look like this:

    Your Solution Looks like a Mix from UnityScript and Boo.
     
  3. Ghosts_Riley

    Ghosts_Riley

    Joined:
    Dec 7, 2013
    Posts:
    82
    Thanks for the help. It didn't fix the other problems though. :(
     
  4. Minneor

    Minneor

    Joined:
    Nov 5, 2012
    Posts:
    3
    You have to Look at the Error Messages. There are Lines showing, where the Error is. For Example this:

    It shows me, that something on Line 54 isn´t Ok. And it says, that there should be an ";" instead of "}". So there is something Missing or Wrong. And so, in Line 53, there is an ";" missing. This should be:

    collision = true;

    So please read the error Messages and try to find the Errors Yourself, this one was not an Heavy to find One. And use the Search Function ( Forum and Answers ), I bet this Question was Answered more than One Time. This are Basic Errors, so try to find the Last Error by Yourself ( if there ist still one ).
     
  5. Ghosts_Riley

    Ghosts_Riley

    Joined:
    Dec 7, 2013
    Posts:
    82
    Thank you for your help again,Minnoer. I see what you are saying. I now know how to understand the errors more. I fixed the errors, but I got some more that i need to take care of. Thank you very much!! I'm fairly new to the whole coding thing. :) There needs to be more people like you on the forums. Have a nice day, and happy Coding!