Quantcast
Channel: Questions in topic: "error message"
Viewing all articles
Browse latest Browse all 2891

I need someone to help me: error CS1525: Unexpected symbol `void'

$
0
0
using System.Collections; using System.Collections.Generic; using UnityEngine; // Use this for initialization void Start () { onGround = true; jumpPressure = 0f; minJump = 2f; maxJumpPressure = 10f; rbody = getComponent(); } // Update is called once per frame void Update () { if(onGround) { //holding jump button// { if(jumpPressure < maxJumpPressure) { jumpPressure += Time.deltaTime*10f; } else { jumpPressure = maxJumpPressure; } } //not holding jump button// else { //jump// if(jumpPressure > 0f) } jumpPressure = jumpPressure + minjump; rbody.velocity = new Vector3(jumpPressure/10f,jumpPressure,0f); jumpPressure = 0f; onGround = false; anim.SetFloat("jumpPressure",0f); anim.SetBool("onGround",false;); } } } } void OnCollisionEnter(Collision other) { if(other.gameObject.CompareTag("ground")) { onGround = true; anim.SetBool("onGround",false;); } } }

Viewing all articles
Browse latest Browse all 2891

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>