- Home /
Why are these errors messing with me?
Some erros i dont understand keep coming. Please help me fix them! Here is a video to demonstrate my problem [CLICK HERE][1] [1]: http://www.youtube.com/watch?v=11TQlvnZFow&feature=youtu.be My script:
#pragma strict
var Dubstep : AudioClip;
var TripEffects : //not assignet yet
Function; Trip(); {
audio.clip = Dubstep
audio.Play();
TripEffects.enabled = true;
}
function Update () {
if(Input.GetKeyUp("p")) {
Function Trip();
}
}
Answer by gregzo · Oct 14, 2012 at 01:53 PM
#pragma strict
var dubstep : AudioClip;
var tripEffects; //What is this? A custom filter?
function Trip()
{
audio.clip = dubstep;
audio.Play();
tripEffects.enabled = true;
}
function Update ()
{
if(Input.GetKeyUp("p"))
{
Trip();
}
}
TripEffects will be post processing effects. Please correct if i'm wrong, but you can enable other scripts/audio sources/post processing effects, like that right?
well, you can't access tripEffects.enabled if you don't know what type tripEffects is.
Answer by Montraydavis · Oct 14, 2012 at 01:49 PM
For one
Function; Trip(); {
audio.clip = Dubstep
audio.Play();
TripEffects.enabled = true;
}
needs to be
function Trip() {
audio.clip = Dubstep;
audio.Play();
TripEffects.enabled = true;
}
Your answer
Follow this Question
Related Questions
syntax errors 1 Answer
Cant Add Script (or create any new scripts) Javascript 2 Answers
Why do i get 4 errors here? (Javascript) 1 Answer