Hi everyone! I am probably missing something simple here. I have an example code (about genetic algorithms) and I try to make this animation interactive with TouchOSC. In my setup in my main program I get two errors relating to the port. I have copied those two lines from an oscReceive example that worked fine. Can somebody spot a problem here? I attach the mentioned setup function and header file here. Many many thanks!
#include "ofApp.h"
#define FRAME_WIDTH 80
#define FRAME_HEIGHT 60
//--------------------------------------------------------------
void ofApp::setup(){
cout << "listening for osc messages on port " << PORT << "\n"; // error here: Expected expression
receiver.setup(PORT); // error here: Unexpected ';' before ')'
ofBackground(255);
ofSetFrameRate(60);
popmax = 10;
mutationRate = 0.025;
forrest.setup(mutationRate, popmax);
}
In my header file I have this (there are extra things there as well waiting for the be cleaned)
#pragma once
#include "ofMain.h"
#include "ofxOsc.h"
#include "Forrest.h"
//// listen on port 8000
#define PORT 8000;
#define NUM_MSG_STRINGS 20
class ofApp : public ofBaseApp{
public:
void setup();
void update();
void draw();
void keyPressed(int key);
void displayInfo();
int popmax;
float mutationRate;
Forrest forrest;
bool activate;
// message things
ofxOscReceiver receiver;
float avgX, avgY;
deque<string> messageBuffer;
int maxBufferSize=20;
int myNum;
float myNum2;
string myString;
float myTime;
int rectSize;
float noiseScale;
float time;
float xLoc;
float yLoc;
float xVal;
float yVal;
};