I'm working on my first script ( a modification of
this ) and I need to store large amounts of information (let's say a 1000 char string). I don't know how to do that with ordinary brick events, as the char limit is around 200. However, I've found that using file I/O is very easy and convenient. The user enters the directory of the file they want to access, and the script then converts the file into a series of notes that are played in Blockland. Quite easy stuff, in other words.
But I'm wondering if giving access to my computer like that is abusable somehow. Can the user hack his way into my computer by sending some stuff along with the packets that request access to my file?
The code looks like this:
function fxDtsBrick::pianoSynthRFF(%brick,%nameOfFile,%delay,%client)
{
//blabla
%brick.noteCount = 0;
%brick.isPlaying = 1;
%file = new fileObject();
%file.openForRead(%nameOfFile);
playSynth(%brick,%file.readLine(),%delay);
%file.close();
%file.delete();
}
Is this method safe? Or do you suggest anything else?