setting a "name"

void powerState(boolean state){
  switch(state){
        case false:
          if (currentlyRunning == true) {
            digitalWrite(pinRelay, LOW);
            currentlyRunning = false; //set global variable that keeps track of system status
            stateChangeMillis = millis();
            lcd.begin(16, 2); //reset the LCD since it seems to mess up after the AC is turned on
            lcd.print("System Off");
            systemStatus= "ON" 
          }
          break;
 boolean stateChangeAllowed;
  lcd.clear();
  // display setpoints
  lcd.setCursor(0,0); //move to first character of first line (lines start at 0)
  // although not necessary the first pass through,
  // is necessary on subsequent passes
  lcd.print("Set:    "); //print to LCD
  lcd.print(tempSetPointF);
  lcd.print("F, ");
  lcd.print(systemStatus);

I am setting up a controller for a pellet stove, and I would like my LCD to state whether the system is on or off. Above is two sections of the code, one that turns the system on or off, the other shows part of the LCD code. My thought is to somehow declare systemStatus as "on" or "off" depending on which case it falls in. How can this be accomplished? What I have right now (systemStatus= "ON") is obviously incorrect, but just there to show my thoughts.
I have systemStatus declared as a volatile int

Either declare it a bool and use true and false instead of on and off. Or keep is an int and use 1 and 0.

Can you be more specific? I didn't write this code, I am just adding my own parts. I'm not a skilled programming, just an okay hacker.
And, I want the LCD to display "On" or "Off" not just 1 or 0. I can get it to that just fine.

I have systemStatus declared as a volatile int

But you are trying to assign a string to it.

Post ALL of your code!

bool state = false;

/* some other stuff here */
lcd.print(state ? "ON" : "OFF"); // this will print OFF because state is false.

All you need is a way to change it to true when you need it to be ON.

My full code exceeds the character limit...unless there is a workaround?

leejones15:
Can you be more specific? I didn't write this code, I am just adding my own parts. I'm not a skilled programming, just an okay hacker.
And, I want the LCD to display "On" or "Off" not just 1 or 0. I can get it to that just fine.

You have an int variable right? Now you're trying to put "ON" and "OFF" in it. But that's not going to work becaue those are strings, they're not integers. If instead you put 0 for OFF and 1 for ON then you can always look at that variable and know which state you're in. If you know which state you're in, then you can print whatever you want to the LCD.

if(systemStatus == 1){
     lcd.print("System ON");
}
else if (systemStatus == 0) {
     lcd.print("System OFF");
}