perhaps load and save the string rather than the lines then.
PHP Code:
// Load and save strings, not lines
function onActionServerSide(afi, svar1, svar2) {
switch (afi) {
case "callTextTypeFile":
temp.text_type_file.loadString(svar1);
triggerClient("gui", name, "displayTextTypeFile", temp.text_type_file);
break;
case "editTextTypeFile":
temp.text_type_file.saveString(svar2, 0);
break;
}
}
//#CLIENTSIDE
// Receive the entire text string and display it on the multiline text control
function onActionClientside(cmd, param) {
switch (cmd) {
case "displayTextTypeFile":
MyGuiMultiLineTextControl.text = param;
break;
}
}
// Send a string rather than lines
function sendStringToServer() {
temp.mytext = MyGuiMultiLineTextControl.text;
triggerServer("gui", name, "editTextTypeFile", temp.mytext, "MyFile.txt");
}