this is probably the stupidest question but when i either right my own code or actually type out prewritten code instead of just copying and pasting it
i get an error saying "main script not found-check prefrences"
You also have to check the box "Use current script" (or similar) in the preferences of SED. I'm not sure where exactly that option is, as I'm on a system without 3DGS at the moment.