Question by
yourfaceboio · May 28, 2017 at 09:56 PM ·
voidunexpected-symbol
Unexpected symbol `void'
Hello, I'm really new to all of this, and know next to nothing about scripting. I made a small script to play a sound on collision with an object. Take a look:
void OnTriggerEnter (Collider other)
{
if(other.gameObject.tag == "Floor")
{
Audio.PlayOneShot(impact);
}
}
I get an error, it reads: Assets/Scripts/soundplay1.cs(1,0): error CS1525: Unexpected symbol `void'
So can somebody help me...? Sorry, I'm a bit dumb when it comes to things like this.
Comment