I actually just looked at the full torque 3d torquescript reference, fileDelete is a default function.
Ok, it must just be fileCopy then. I know he added something.
Badspot has either removed a lot of stuff, or the version of t3d that bl runs on is just too old.There's also a crapload of other file stuff, including full support for zip files.
That's because we are on TGE 1.3 (modded), not T3D.
Sorry, that's what I meant.And also I'm sorry elm but there is a much better way to do rot13 and I will be putting that in very soon.Edit: I will also be adding in the ceaser cipher tomorrow as well.
Sorry, that's what I meant.
It's ok haha.Also, added the function benchmarking one: http://rosettacode.org/wiki/Time_a_function#TorqueScript
These aren't natural.
//csv2html(inputFilePath, outputFilePath, INT size of border for table, INT size of cellpadding for table);function csv2html(%input, %output, %border, %padding) { %f = new fileObject(); //Create a file object if(!isFile(%input)) //Check if the input exists { error("Error 404, could not find input file:" SPC %input); return; } if(!isWriteableFile(%output)) //Check if we can create the output { error("Cannot write to file:" SPC %output); return; } if(fileExt(%input) !$= "csv" || (fileExt(%output) !$= "html" && fileExt(%output) !$= "htm")) //Check if we're using the right extension { error("Invalid file extension. Try: csv for the input file, and htm or html for the output."); return; } %f.openforRead(%input); //read the input while(!%f.isEOF()) //process the input %workingFile = %f.readLine(); %f.close(); //close and delete the file object %workingFile = strReplace(%workingFile, ",", "</td><td>"); //process the data %workingFile = strReplace(%workingFile, "\r\n", "</td></tr>\r\n<tr><td>"); //more processing %f.openForWrite(%output); //using our original file object // %f.writeLine("<html><title>Converted from CSV</title><body>"); //pretty title for a full page, you can uncomment this if you'd like. %f.writeLine("<table" SPC ((%border > 0) ? "border =" SPC %border SPC "" : "") @ ((%padding > 0) ? "cellPadding =" SPC %padding : "")); //fancy ternary operators for determining border size %f.writeLine(%workingFile); //write the processed file %f.writeLine("</table></body></html>"); //close the html thingies %f.close(); //close file object %f.delete(); //delete file object}
<table><tr><td>Character</td><td>Speech</td></tr><tr><td>The multitude</td><td>The messiah! Show us the messiah!</td></tr><tr><td>Brians mother</td><td><angry>Now you listen here! He's not the messiah; he's a very naughty boy! Now go away!</angry></td></tr><tr><td>The multitude</td><td>Who are you?</td></tr><tr><td>Brians mother</td><td>I'm his mother; that's who!</td></tr><tr><td>The multitude</td><td>Behold his mother! Behold his mother!</td></tr></table>
I signed up..
http://rosettacode.org/wiki/Category:TorqueScript_User
how do you add yourself :(
{{mylangbegin}}{{mylang|TorqueScript|Advanced}}{{mylang|C#| Proficient}}{{mylang|C++|Interested Beginner}}{{mylang|Java|Currently Learning}}{{mylang|PHP|Intermediate}}{{mylang|JavaScript| Proficient}}{{mylang|MySQL|Interested Beginner}}{{mylang|Scheme|Intermediate}}{{mylang|Scratch|Advanced}}{{mylang|TI-83 Basic|Intermediate}}{{mylangend}}