Author Topic: Torquescript Challenges  (Read 2151 times)


*Challenges
Oops. Stupid kindle fire actually didn't autocorrect that.

Oops. Stupid kindle fire actually didn't autocorrect that.
No, stupid you didn't automatically correct that

New challenge -> Auto correct

Try making a message logger, all you need to study is FileObjects.

No, stupid you didn't automatically correct that
Wow. Just wow.

New challenge -> Auto correct
Yes, maybe this could go with the auto capitalization thingy
that I wanted.

Try making a message logger, all you need to study is FileObjects.
Won't work. Badspot broke file objects for now.

Won't work. Badspot broke file objects for now.

You can still make a message logger. File objects are not completely broken.

Code: [Select]
function appendToFile( %file, %line )
{
%obj = new fileObject();
%obj.openForRead( %file );

while ( !%obj.isEOF() )
{
%content = %content @ ( strLen( %content ) ? "\r\n" : "" ) @ %obj.readLine();
}

%obj.close();
%obj.openForWrite( %file );

%obj.writeLine( %content );
%obj.writeLine( %line );

%obj.close();
%obj.delete();
}