error CS1525: Unexpected symbol `)'

using UnityEngine;
using System.Collections;

public class NewBehaviourScript : MonoBehaviour {
public int maxHealth = 100;
public int curHealth = 100;

public float healthBarLength;

// Use this for initialization
void Start () {
healthBarLength = Screen.width / 2;
}

// Update is called once per frame
void Update () {

}

void OnGUI() {
	GUI.Box(new Rect(10, 10, Screen.width / 2 / (maxHealth / curHealth), 20), curHealth + "/" + maxHealth);
}public void AddjustCurrentHealth(int adj) {
		curHealth += adj;
	
	if(curHealth < 0)
		curHealth = 0;
	
	if(curHealth > maxHealth)
		curHealth = maxHealth;
	
	if (maxHealth < 1)
		maxHealth = 1;
		
	
		healthBarLength = (Screen.width / 2) * (curHealth / (float))maxHealth; 
	
	
}       }

It seems the error is at:

(curHealth / (float))maxHealth;

the correct sintax is:

(curHealth / (float)maxHealth);

Your last ) needs to move after the variable name. The console tells you what line numbers your error is on.

Screen.width is an int, by the way, so you shouldn’t do integer division with it, like you are.

 healthBarLength = Screen.width * .5F * (curHealth / (float) maxHealth); 

But the parentheses aren’t helping you at all, and if you get rid of them, you don’t need an explicit cast.

healthBarLength = Screen.width * .5F * curHealth / maxHealth;

You may want to store Screen.width * .5F / maxHealth as a variable to avoid an extra multiplication and a division all the time.