Getting errors working with String Arrays

Okay, I reworked things around a while ago to experiment and now I can read what is in the .txt file, but I still cannot change what is written inside. This is part of a highscore system for a larger game btw

int sessionhs;
String shs = nf(sessionhs);                             
String[] lasths;                                                               
int ahs;                                            
String ahs1;

void setup() {
  size(1920, 1080);
  lasths =  loadStrings("hs.txt"); 
}

void draw() {
  ahs1 = (lasths[0]);
  ahs = int(ahs1);
  if (sessionhs > ahs) {
    ahs = sessionhs;
    ahs1 = shs;
    lasths[0] = ahs1;
    saveStrings("hs.txt", lasths);  
    println("l" + ahs);
  }
}