We are about to switch to a new forum software. Until then we have removed the registration on this forum.
As you can see in the code below, I tried to save an Array to a .txt file (as well I tried it with .json) but couldn't get a result. The console.log gives out the right things but the .txt as well as the .json-file only contain some strange charakters...as seen here: ºw^~)Þ and yes it does not change in size or charakter if using more words. Someone got an idea what is missing or terrible wrong?
//Save JSON-File
if ((hit[3] == 1)) {
var TextFile = ['Farbe','_','FarbeTank','_'];
//var list = split(TextFile, 'z');
saveStrings(TextFile, 'test.txt');
saveStrings(list, 'test2.txt');
/**
var JSONObj = {
"FarbeKarosserie" : {
Farbname: cSavedColorName_K,
Farbwerte: cSavedColor_K,
}
}
save(JSONObj, 'engo_File.json', true);
*/
/**
JSONObj= json={};
json.id=0;
json.Farbe_Karosserie=cSavedColorName_K;
json.Farbe_Karosserie=cSavedColorName_T;
json.name="test";
*/
hit[3] = 0;
}
Answers
Is the syntax supposed to be [] for enclosing an array? In common Processing, an array is enclosed in {}.
Thanks for your answer and yes, it is correct.I tried it now just to see if I might be wrong, but unfortunately I was correct.
Okey, found out that it is a problem with the editor. Used firefox and it worked as intendet.