I have some similar old 1.0 code that works just fine. From a quick glance that is probably failing due to the "file" variable not being defined, and you have an extra apostrophe in the nlapiSendEmail function. Is that defined as a global variable earlier on in your script, also is "x" defined as an email address or internal ID?
Try running it with some try catch statements to get more specific error information. This should give you enough information for debugging where your problem is at.
function creatingFile(){
var fileContents='ASDFASDf,asdfgasfasdf';
var folderID='12345'; //replace with a valid folder internal ID.
try{
var fileObj=nlapiCreateFile('mycsv.csv','CSV',fileContents);
fileObj.setFolder(folderID);
var fID=nlapiSubmitFile(fileObj);
}catch(err01){
nlapiLogExecution('DEBUG','ERROR 01',JSON.stringify(err01));
}
try{
nlapiSendEmail(15,x,"asd",fID,null,null,null,null);
}catch(err02){
nlapiLogExecution('DEBUG','ERROR 02',JSON.stringify(err02));
}
}