Question by
blutackboy · Jan 27, 2016 at 03:08 PM ·
errornooberror-cs1525
Wallrun script errors
Hi I made a script but I'm receiving errors (probably because of something silly like a curly bracket :P) I cant seem to fix or find so I would like some help with that but also, what they mean so if it happens again ill be ready! (error cs1525, cs1041 and cs8025)
using UnityEngine;
using System.Collections;
public class Wallrun : MonoBehaviour
{
public float collider;
public float moveSpeed;
WalkScript walk;
Camera player;
void awake()
{
walk = GetComponent<WalkScript> ();
}
// Update is called once per frame
void update()
{
function OnTriggerEnter (other : collider) {
walk.enabled= false;
transform.Translate (Vector3.forward * moveSpeed * Time.deltaTime);
}
function OnTriggerexit (other : collider) {
walk.enabled = true;
}
}
}
}
Comment
Answer by Astraphobia95 · Jan 27, 2016 at 05:14 PM
One too many curly brackets in the update function!
Your answer
![](https://koobas.hobune.stream/wayback/20220612061858im_/https://answers.unity.com/themes/thub/images/avi.jpg)