How to output a variable in GUI.Box with Boo?

Hello, I am new to Unity, and I need to create a health bar. My idea is to create the box, and in it, print the current health / max health. Here is my Boo script:

import UnityEngine

class PlayerHealth (MonoBehaviour):
	public curHealth as int = 100
	public maxHealth as int = 100

	def Start ():
	def Update ():
	def OnGUI() as void:
		GUI.Box(Rect(10, 10, Screen.width / 3, 30), curHealth.string '/'  + maxHealth.string)

I get these two errors:

Assets/Scripts/,74): BCE0044: expecting “RPAREN”, found ‘/’.

Assets/Scripts/,100): BCE0043: Unexpected token: ).

What am I doing wrong? An answer in Boo would be great, but C# would also be fine if you need to. Thanks in advance.


Well, Here it is:

	def OnGUI() as void:
		GUI.Box(Rect(10, 10, Screen.width / 3, 30), curHealth.ToString() +'/' + maxHealth.ToString())

Instead of .string, it is .ToString(). I also needed the + before ‘/’.

Please don’t post ‘where am I missing a parenthesis’ questions, there’s really no reason that should be posted anywhere. Finding simple syntax errors is a skill you must learn and you won’t by asking others to do it for you. I don’t know Boo but I can only assume RPAREN means you are missing a parenthesis, just eyeballing it probably at the end of your GUI.Box line