saveJSON(obj, "filename") saves 45 files instead of one.

function gui_mouseClicked() {
  buttons.map((button) => {
    if(button.checkClick() === "save") {
      saveJSON(nn,"nn.json");
    }
  })
}

This function runs inside mouseClicked(). The checkClick() function just returns something if the mouse is on the button. nn is an object .

Sign In or Register to comment.