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

CS1525: Unexpected symbol '{'

$
0
0
I was creating a survival game and when I was editing for when I hit the tree she fell gave this error using System.Collections; using System.Collections.Generic; using UnityEngine; public class MeleeSystem : MonoBehaviour { private Arvere Arvore; public int tamanhoDoBracoDoRapaz = 4; // Use this for initialization void Start () { } // Update is called once per frame private void Update () { RaycastHit hit; Ray ray = Camera.main.ScreenPointToRay (Input.mousePosition); if(Physics.Raycast (ray, out hit, 15) { if(hit.distance <= tamanhoDoBracoDoRapaz){ if (Input.GetMouseButtonDown (0)) { if (hit.collider.tag == "Arvore") { Arvore = hit.collider.GetComponentInParent (); Dano (); } } } } } void Dano(){ Arvore.ArvoHP -= 1; Debug.Log (Arvore.ArvoHP); } } ,I was creating a survival game and when I was editing for when I hit the tree she fell gave this error using System.Collections; using System.Collections.Generic; using UnityEngine; public class MeleeSystem : MonoBehaviour { private Arvere Arvore; public int tamanhoDoBracoDoRapaz = 4; // Use this for initialization void Start () { } // Update is called once per frame private void Update () { RaycastHit hit; Ray ray = Camera.main.ScreenPointToRay (Input.mousePosition); if(Physics.Raycast (ray, out hit, 15) { if(hit.distance <= tamanhoDoBracoDoRapaz){ if (Input.GetMouseButtonDown (0)) { if (hit.collider.tag == "Arvore") { Arvore = hit.collider.GetComponentInParent (); Dano (); } } } } } void Dano(){ Arvore.ArvoHP -= 1; Debug.Log (Arvore.ArvoHP); } }

Viewing all articles
Browse latest Browse all 2891

Trending Articles



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