So I finally did it! I got the script to make a JSON file and then imported it into spine!
Im not sure if it's a bug or this is what we're supposed to do every time, but the only way I got it to work was by clicking "save file as" in photoshop right before I ran the script.
By doing that the script recognised that the psd is in fact saved under a file name, and created a JSON under that file name.
Strange because I did'nt create a new name to save the file under, I just clicked the "save file as" button and then the computer made a new copy of it, as if the previous copy was'nt good enough. Heheheh
Well maybe im just computer stupid, or maybe the computer is stupid. But either way Im very happy that it works now, and i couldnt have done it without your guys guidance pointing me in the direction to look.