Get component help

Hey guys I’m new to c# and am having trouble getting my player health returned. Any ideas

using UnityEngine;
using System.Collections;

public class PlayerHealth : MonoBehaviour {
 
 // players health based on class
 // temp value 100 inplace
 public int maxHealth = 100;
 public int currentHealth = maxHealth;
 
 // increase health based on additional attributes
 public float healthBuffer = 1.1f;
 
 public void AdjustCurrentHealth(int adjustment) {
  currentHealth += adjustment;
  
  if(currentHealth < 0) {
   currentHealth = 0;
   Die();
  }
 }
 
}[code]


[code]
using UnityEngine;
using System.Collections;

public class BaseStats  {
 
 
 // attributes
 public int strength;
 public int stamina;
 public int intelligence;
 public int agility;
 public int willpower;
 
 
 public float GetPlayerHealth() {
  // return health with buff
 }
 
 public void SetPlayerHealth() {
  
  // set players health to 'playerhealth' * 'healthBuffer'
 }
 

 
}[code]

your code brackets aren’t showing… you close code brackets with [/code], not

I'm assuming your problem is where you say:
//return health with buff
//set players health to 'playerHealth' * 'healthBuffer'

ok... returning it requires just returning what YOU define is the health with buff. We don't know what that is.

As for the setPlayerHealth. Well first off you should probably have a input parameter on the function to receive a new health value. And what is 'healthBuffer'? I see there is a 'healthBuffer' in the other class... if that's what you're talking about, you'll need to get a reference to it.