Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 13 Next capture
2021 2022 2023
1 capture
13 Jun 22 - 13 Jun 22
sparklines
Close Help
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
  • Asset Store
  • Get Unity

UNITY ACCOUNT

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account
  • Blog
  • Forums
  • Answers
  • Evangelists
  • User Groups
  • Beta Program
  • Advisory Panel

Navigation

  • Home
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
    • Blog
    • Forums
    • Answers
    • Evangelists
    • User Groups
    • Beta Program
    • Advisory Panel

Unity account

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account

Language

  • Chinese
  • Spanish
  • Japanese
  • Korean
  • Portuguese
  • Ask a question
  • Spaces
    • Default
    • Help Room
    • META
    • Moderators
    • Topics
    • Questions
    • Users
    • Badges
  • Home /
avatar image
0
Question by scardoso333 · Jul 15, 2014 at 01:33 PM · error

Help with Error CS1519?

i am trying to do a tutorial off of youtube and i am writing the code but i always get error CS1519 unexpected symbol void' in class struct or interface member declaration. I tried everything. Searching the web, looking at the video code, searching it on youtube but nothing helps. here is my code.

 using UnityEngine;
 using System.Collections;
 
 public class Enemy : MonoBehaviour {
     public Transform[] enemyPoints;
     public float moveSpeed;
     private int currentPoint
 
     // Use this for initialization
     void Start () {
 
         transform.position = enemyPoints[0].position;
         currentPoint = 0;
     }
 
     // Update is called once per frame
     void Update () {
         if (transform.position == enemyPoints[currentPoint].position)
 
         {
             currentPoint ++;
         }
 
         transform.position = Vector3.MoveTowards(transform.position, enemyPoints [currentPoint].position.moveSpeed * Time.deltaTime);
      }
  }

Please help soon.

Comment
Add comment · Show 4
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image Landern · Jul 15, 2014 at 01:35 PM 0
Share
  • @ tanoshimi, this the only correct answer.

avatar image gjf · Jul 15, 2014 at 01:40 PM 2
Share

try posting a link to the tutorial if you're asking for help. i, for one, can't read $$anonymous$$ds.

"I tried everything."

except to pay more attention to what you're copying. i'd be surprised if the tutorial had the error...

in the meantime add a semicolon to line 7.

avatar image stevethorne · Jul 15, 2014 at 02:16 PM 0
Share

The answer was already given an hour and a half before you gjf, no need for the attitude or repost.

avatar image gjf · Jul 15, 2014 at 02:21 PM 0
Share

with all due respect it seems like the question was asked 47 $$anonymous$$utes ago, so not sure where you're getting your hour and a half from, and the only comment was as shown in the attached pic. kindly direct me to the answer. alt text

screenshot 2014-07-15 15.19.12.png (180.1 kB)

1 Reply

· Add your reply
  • Sort: 
avatar image
0

Answer by dsada · Jul 15, 2014 at 07:02 PM

You are missing a semicolon at your last member declaration at line 7

private int currentPoint;

Comment
Add comment · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

Your answer

Hint: You can notify a user about this post by typing @username

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

Follow this Question

Answers Answers and Comments

5 People are following this question.

avatar image avatar image avatar image avatar image avatar image

Related Questions

Strange errors with GUI.skin 1 Answer

RigidBodys and Scripts equals Error. 2 Answers

Assets/Scripts/PlayerController.cs(22,25): error CS8025: Parsing error 0 Answers

It is not possible to invoke an expression of type 'UnityEngine.GameObject'? 1 Answer

need help, with greater than statment 1 Answer


Enterprise
Social Q&A

Social
Subscribe on YouTube social-youtube Follow on LinkedIn social-linkedin Follow on Twitter social-twitter Follow on Facebook social-facebook Follow on Instagram social-instagram

Footer

  • Purchase
    • Products
    • Subscription
    • Asset Store
    • Unity Gear
    • Resellers
  • Education
    • Students
    • Educators
    • Certification
    • Learn
    • Center of Excellence
  • Download
    • Unity
    • Beta Program
  • Unity Labs
    • Labs
    • Publications
  • Resources
    • Learn platform
    • Community
    • Documentation
    • Unity QA
    • FAQ
    • Services Status
    • Connect
  • About Unity
    • About Us
    • Blog
    • Events
    • Careers
    • Contact
    • Press
    • Partners
    • Affiliates
    • Security
Copyright © 2020 Unity Technologies
  • Legal
  • Privacy Policy
  • Cookies
  • Do Not Sell My Personal Information
  • Cookies Settings
"Unity", Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S. and elsewhere (more info here). Other names or brands are trademarks of their respective owners.
  • Anonymous
  • Sign in
  • Create
  • Ask a question
  • Spaces
  • Default
  • Help Room
  • META
  • Moderators
  • Explore
  • Topics
  • Questions
  • Users
  • Badges