Hey, I’m currently having a little bit of trouble getting this to work. I’ve defined all my variables and managed to get the story to generate but the if statements aren’t making sense.
With what I have currently the name .replace works when the values are in US terms, but when it’s converted to UK values the name doesn’t work.
I also have a feeling that the way I have .replace defined in every if statement isn’t efficient, but without having them it just defaults back to the insert values in the string (:insertx: , :inserty: , :insertz:)
Hey, I managed to get this to work with help of a friend. What was going wrong is I was telling the program to replace storyText (our original string) and it made the code where it was changing above null (not registering)
replacing newStory = storyText.replace("Bob", name);
with newStory = newStory.replace("Bob",name);
in our if statements, fixed my issues as it now replaces within our new set variable (newStory). I hope this helps anyone who is looking for help