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

I need to know how to get rid of this EOF error.

$
0
0
This is the error: Assets/flashlightonandoff.js(1,1): BCE0044: expecting EOF, found 'Light'. I am making a game sort of slender-ish and I wanted a button to toggle the flashlight on and off so I have the script. I have tried many different placements of parenthesis' and can't seem to get them in the right place without them triggering another EOF error. Please help. Thankyou in advance. SCRIPT: Light : flashlight bool : on = false; void Start() { flashlight = GetComponentInChildren();; } void Update() { if(on) flashlight.light.enabled = true; else if(!on) flashlight.light.enabled = false; if(Input.GetKeyDown(KeyCode.F)) on = !on; }

Viewing all articles
Browse latest Browse all 7934

Trending Articles



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