Trying to run a large sketch I cloned from Github, I get the error
size() cannot be used here, see https://processing.org/reference/size_.html
Documentation says:
the size() function must be the first line of code inside setup(), and the setup() function must appear in the code tab with the same name as your sketch folder.
This is the case: size() is called exactly once as the first statement in setup() in a tab named TheAbyss. This is also the name of the sketch and the name of the folder in which the sketch files reside.
How can I find out why Processing doesn’t like size() at this location? Thanks for any input.
The sketch is much too large to copy here, but for what it’s worth, here is the beginning of the TheAbyss tab:
/**
* The Abyss
* 2010-13
*/
CreatureManager creatureManager;
boolean useBackdrop = true;
void setup() {
size(displayWidth, displayHeight, P3D);
smooth(8);
frameRate(60);
creatureManager = new CreatureManager(this);
// creatureManager.toggleManagerInfo(); // turn info off
initShaders();
}
void draw() {
...