boogerlab
YaBB Newbies
Offline
Posts: 2
Runs but doesn't export
Mar 25th , 2008, 7:22am
I am having trouble exporting from processing but it runs fine. It says -processing.app.RunnerException: Identifier expected instead of this token at processing.app.Compiler.message(Compiler.java:339) at processing.app.MessageSiphon.run(MessageSiphon.java:60) at java.lang.Thread.run(Unknown Source) Can anyone tell me what I am doing wrong? Here is my code: /* * kenny smith * Created 20 march 2008 */ void setup(){ frameRate(25); size(400, 400); noCursor(); fill (255, 200); noStroke(); smooth(); for (int i = 0; i < Xsquares; i++){ for (int j = 0; j < Ysquares; j++){ for (int z = 0; z < Zsquares; z++){ squareX[i][j][z] = -50; squareY[i][j][z] = -50; squareXMove[i][j][z] = 0; squareYMove[i][j][z] = 0; squareRotate[i][j][z] = 0; squareShape[i][j][z] = "triangle"; squareZ[i][j][z] = 8.5; } } } } String shape = "square"; int zoom = 200; int Zsquares = 6; int Xsquares = 13; int Ysquares = 20; int[][][] squareX = new int[Xsquares][Ysquares][Zsquares]; int[][][] squareY = new int[Xsquares][Ysquares][Zsquares]; float[][][] squareXMove = new float[Xsquares][Ysquares][Zsquares]; float[][][] squareYMove = new float[Xsquares][Ysquares][Zsquares]; float[][][] squareRotate = new float[Xsquares][Ysquares][Zsquares]; String[][][] squareShape = new String[Xsquares][Ysquares][Zsquares]; float[][][] squareZ = new float[Xsquares][Ysquares][Zsquares]; int row= 0; int place=0; void draw(){ background(0); if (place > 10) { for (int z = 0; z < Zsquares; z++){ for (int i = 0; i < Xsquares; i++){ squareZ[i][row][z] = (zoom/20)/(z+1)+1; squareX[i][row][z] = i*30; squareY[i][row][z] = 400; squareXMove[i][row][z] = random(500)-250; squareYMove[i][row][z] = random(300)+400; squareRotate[i][row][z] = random(360)-180; squareShape[i][row][z] = shape; //fill(row*20); place = 0; row++; if (row >Ysquares-2) { row = 0; } } } } place++; for (int j = 0; j < Ysquares; j++){ for (int z = 0; z < Zsquares; z++){ for (int i = 0; i < Xsquares; i++){ squareY[i][j][z]-=2; squareXMove[i][j][z]=(squareXMove[i][j][z])/1.03; squareYMove[i][j][z]=(squareYMove[i][j][z])/1.03; squareRotate[i][j][z]=(squareRotate[i][j][z])/1.05; if (squareShape[i][j][z] == "diamond") { diamond(int(squareXMove[i][j][z]+squareX[i][j][z]+20), int(squareYMove[i][j][z]+squareY[i][j][z]), squareRotate[i][j][z], squareZ[i][j][z]); } if (squareShape[i][j][z] == "square") { squarey(int(squareXMove[i][j][z]+squareX[i][j][z]+20), int(squareYMove[i][j][z]+squareY[i][j][z]), squareRotate[i][j][z], squareZ[i][j][z]); } if (squareShape[i][j][z] == "triangle") { tri(int(squareXMove[i][j][z]+squareX[i][j][z]+20), int(squareYMove[i][j][z]+squareY[i][j][z]), squareRotate[i][j][z], squareZ[i][j][z]); } } } } zoom = mouseY; if (mousePressed) { if (shape == "square") { shape = "diamond"; } else if (shape == "diamond") { shape = "triangle"; } else if (shape == "triangle") { shape = "square"; } } } void diamond(int x, int y, float r, float z) { fill (255, (z*10)+30); quad(x- (cos(r)*z), y-(sin(r)*z), x+(sin(r)*z), y-(cos(r)*z), x+(cos(r)*z), y+(sin(r)*z), x-(sin(r)*z), y+(cos(r)*z)); } void squarey(int x, int y, float r, float z) { fill (255, (z*10)+30); r += 10.2; quad(x- (cos(r)*z), y-(sin(r)*z), x+(sin(r)*z), y-(cos(r)*z), x+(cos(r)*z), y+(sin(r)*z), x-(sin(r)*z), y+(cos(r)*z)); } void tri(int x, int y, float r, float z) { fill (255, (z*10)+30); triangle(x- (cos(r)*z), y-(sin(r)*z), x+(sin(r)*z)*1.8, y-(cos(r)*z)*1.8, x+(cos(r)*z), y+(sin(r)*z)); }