This is the "Scripting" forum. Is this really a scripting/automation problem? It doesn't sound like it. Plus, there are a hundred reasons why a file might fail to export. You're going to have to be more detailed in what you did or did not do.
Sure. First off, as you are clearly a beginner and this is your first post: learn the lingo. "What are elements, methods, and functions in InDesign called?" It seems a strange thing to ask from a (beginning) designer, but what if you want to draw a plane with semi-circular junctions? (That's a rectangle with rounded corners in ID.)
Any particular reason you chose the scripting forum to post in? "Scripting" is writing lil' programs that can repeat tasks in ID.
"Switch a file to PDF" -- nah. "Export to PDF". In fact, I'm surprised you din't call it that way because you used the Export function before...
"i did what i usually did by going into Adobe Presets and switching everything" -- fah. A preset is just that -- a preset. ID has loads of them. You must mean the PDF presets; and there is a preset called 'Smallest file' (something like that).
As for the actual problem, I have no idea. A quick google, though, using the exact phrase "indesign failed to export pdf" returns some 10,000 hits, and the first one http://hellbox.org/archives/000497.html is an interesting story just to read. Besides, it also mentions a few reasons why export may fail.