Hello, Vanilla here. I am the one who made the “A Plant’s Life” generator.

There is an issue in this generator where you have to click the “Who’s my gardener?” text, “Cool!” text, and the “Approve” button twice in order to make the brown box with text appear. This is strange, because there is a generator with the similar code that this generator is inspired by, and that generator doesn’t have a similar issue. When you click the “Continue” button after choosing a deputy and medicine cat, it will show you a box with an image and white text in it, along with the clan event log, instead of having the annoying issue where you have to choose deputy and medicine cats and click the “Continue” button again.

I am not sure if this is a bug, but I find this strange, because of the other generator. Can anybody please provide the code/feedback to fix that for me? Thanks.

  • VioneT@lemmy.worldM
    link
    fedilink
    English
    arrow-up
    1
    ·
    6 days ago

    I’ve checked the code and on the button on the approve list, you need to increment the click and set the continue variable before updating. It needs double update since you ‘update’ it first then set the appropriate values to the variables.

    • VanillaFlower@lemmy.worldOP
      link
      fedilink
      English
      arrow-up
      1
      ·
      edit-2
      6 days ago

      What do you mean by “update?” Do you mean the function of button, changing using goto plugin, or function to save the generator’s updates? /nm /nf /nav /genq

      • VioneT@lemmy.worldM
        link
        fedilink
        English
        arrow-up
        1
        ·
        6 days ago

        This button:

        <button onclick="update(), click++">Approve</button>
        

        You should set the variables first before the update() e.g.

        <button onclick="click++, update()">Approve</button>