We are about to switch to a new forum software. Until then we have removed the registration on this forum.
I'm trying to run this code, don't know what is wrong. Please help! Receiving this message:
Could not run the sketch (Target VM failed to initialize). Make sure that you haven't set the maximum available memory too high. For more information, read revisions.txt and Help → Troubleshooting.
String[] words;
IntDict concordance;
int index = 0;
void setup() {
size(600, 400);
String[] lines = loadStrings("melissa.txt");
String allthetxt = join(lines, " ");
words = splitTokens(allthetxt," ,.:;!¡¿?");
printArray(words);
for (int i = 0; i < words.length; i++){
concordance.increment(words[i]);
}
println(concordance);
}
void draw(){
background(0);
textSize(64);
textAlign(CENTER);
text(words[index], width/2, height/2);
index++;
}
Answers
It might be that melissa.txt is causing the bug. In your sketch path data folder try removing the file and recreating it.