1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

anyone know C sharp? I need help urgently

Discussion in 'Entertainment and Technology' started by europeanguy, Nov 24, 2017.

  1. europeanguy

    Regular Member

    Joined:
    Apr 6, 2015
    Messages:
    445
    Likes Received:
    13
    Location:
    somewhere
    Gender:
    Male
    Gender Pronoun:
    They
    Sexual Orientation:
    Gay
    Out Status:
    Family only
    https://imgur.com/a/DaQEZ

    its in C# (C sharp)
    I dont know why the " is unexpected. my level of experience with coding is zero, like this is the first time ive ever done any programming in my entire life and ever seen code. and its due in tonight. basically here im trying to shoot a projectile from my FPS controller (Which is thankfully something unity has made for you)

    I have followed the instructions here: https://www.studica.com/blog/how-to-create-a-projectile-in-unity to the letter. you'll notice the code I just posted in my imgur link is on this webpage. but I get this error.


    ive got to make objects spawn in a sphere radius around my FPS controller as well next :confused: Ive been struggling with this stupid projectile thing all day and its due in tonight XD im boned. but luckily the objects spawning at random locations within a sphere radius around my FPS controller is the last thing I need to do then its complete and I can hand it in and never look at it again. its like hitting my head off a brick wall
     
  2. europeanguy

    Regular Member

    Joined:
    Apr 6, 2015
    Messages:
    445
    Likes Received:
    13
    Location:
    somewhere
    Gender:
    Male
    Gender Pronoun:
    They
    Sexual Orientation:
    Gay
    Out Status:
    Family only
    nevermind, ignore this thread please its past the deadline and ive been forced to hand it in XD i also eventually worked this bit out and it works anyway. but ended up being stuck on other things but I hope I passed somewhat anyways :confused: I cant work out how to delete this thread sorry!
     
  3. Celatus

    Full Member

    Joined:
    Sep 19, 2014
    Messages:
    542
    Likes Received:
    1
    Location:
    US
    Gender:
    Male
    Gender Pronoun:
    He
    Sexual Orientation:
    Gay
    Out Status:
    Some people
    Wait who the hell would make you code something that complex if you've never coded before?! I mean do you know any C++, C, Java, or Python? Or even syntactically how to approach writing something from an object oriented perspective?
     
  4. Randy

    Full Member

    Joined:
    Aug 23, 2012
    Messages:
    3,784
    Likes Received:
    2
    Location:
    Texas
    Gender:
    Male
    Gender Pronoun:
    He
    Sexual Orientation:
    Gay
    Out Status:
    Some people
    Did you copy and paste the code from the website or did you retype it yourself? If the former, that could be (and most likely is) the problem. The code on the webpage has "curly" quotation marks; however, your keyboard will to quotation marks that the tail is "straight down."
     
  5. Randy

    Full Member

    Joined:
    Aug 23, 2012
    Messages:
    3,784
    Likes Received:
    2
    Location:
    Texas
    Gender:
    Male
    Gender Pronoun:
    He
    Sexual Orientation:
    Gay
    Out Status:
    Some people
    In my opinion, it's kind of a fair assignment seeing as they were handed skeleton code. But I do mostly agree that this is way too ccomplex for someone who has never had any coding experience.

    Somewhat related:

    [​IMG]
     
  6. MsEmmzy

    Full Member

    Joined:
    May 24, 2014
    Messages:
    249
    Likes Received:
    26
    Location:
    BC, Canada
    Gender:
    Female (trans*)
    Gender Pronoun:
    She
    Sexual Orientation:
    Other
    Out Status:
    Out to everyone
    Hey, Unity! :grin: But yeah, it's definitely the curly quotations marks. Best not to copy-paste code but rewrite it yourself :slight_smile:
     
  7. mbanema

    Full Member

    Joined:
    Jan 11, 2014
    Messages:
    1,485
    Likes Received:
    30
    Location:
    MA
    Gender:
    Male
    Gender Pronoun:
    He
    Sexual Orientation:
    Gay
    Out Status:
    A few people
    I know C# (although not Unity), but this is definitely the answer. Delete the quotation marks and type them in yourself and it should at least compile.
     
  8. Celatus

    Full Member

    Joined:
    Sep 19, 2014
    Messages:
    542
    Likes Received:
    1
    Location:
    US
    Gender:
    Male
    Gender Pronoun:
    He
    Sexual Orientation:
    Gay
    Out Status:
    Some people
    That picture is hysterical lmao xD