This question was
closed Nov 28, 2016 at 10:12 PM by
Nova-1504 for the following reason:
Fixed it
Question by
Nova-1504 · Nov 28, 2016 at 09:56 PM ·
audioscript errorcompiler errorparsing errorcs8025
CS8025 Parsing Error
No, i'm not missing a bracket. I have an even number. Here is the code:
using UnityEngine;
using System.Collections;
public class PainSound : MonoBehaviour {
public AudioClip whenHurt;
private AudioSource source;
void Awake () {
source = GetComponent<AudioSource>();
}
void Update () {
OnCollisionEnter () {
source.PlayOneShot(whenHurt,1F);
}
}
}
It gives me the location, but it said a ridiculous line number, way past the number of lines I actually have.
Comment
Never $$anonymous$$d, I fixed it. Functions don't go in functions.
Follow this Question
Related Questions
CS0246 _SNAP_PrototypingAssets 0 Answers
parsing error CS8025 2 Answers
error cs80525 parsing error i need help 1 Answer
Unity 5 checking if player isGrounded 1 Answer
Parsing error 1 Answer