Void settings() not working

Hello,
I just typed this code from our script to processing. And the size is staying small, why isn’t it changing?

public void setup() {
  // Fenstertitel mit aktueller Fenstergröße setzen
  surface.setTitle("Schach  " + width + "*" + height);
  background(100);
  
}
//Wenn width und height ungleich sind, wird der größere der beiden Werte in "laenge" gespeichert
void settings(){
 int laenge = 0;
 size(1200,3000);
 size(laenge,laenge);
}
void draw(){

}

Laenge is 0, set it to 1000

Chrisir

Settings is used to give the size of the windows with a variable, first of all you should have those variables as global, second

int laenge = 0;
 size(1200,3000);
 size(laenge,laenge);

What you’re doing here is creating a variable with value 0, then you’re changing the size to 1200x3000 and then you’re changing it to 0x0, mind the order in which you write your commands

1 Like