Somehow SOLVED! OscSender/OscReceiver not sending or receiving

Hi dear Forum,

i have been trying to send one integer data to another app and seem to not be very succesfull at it.
I would appreciate it if you would have a look and give me a hint on my mistake. (In header, setup and update i am writing only the Osc relevant lines)
The draw function in sender prints the distance values all right YET
The draw function in receiver only prints
buf = "listening for osc messages on port 12345
distance:0

How can i control the sent message in sender?

SENDER
//--------------------------------------------------------------
ofApp.h
int distance;
ofxOscSender sender;
//--------------------------------------------------------------
void ofApp::setup()
sender.setup(“localhost”, 12345);
//--------------------------------------------------------------
void ofApp::update()

if (kinect.isFrameNew()) {

// here there are some kinect related stuff) //

	if (contourFinder.blobs.size() > 0) {
		for (int i = contourFinder.blobs[0].centroid.x - 8; i < contourFinder.blobs[0].centroid.x + 8; i++) {
			for (int j = contourFinder.blobs[0].centroid.y - 8; j < contourFinder.blobs[0].centroid.y + 8; j++) {
				distance += kinect.getDistanceAt(i, j);
			}
		}
		distance /= 64;
	}

	//in or out of if clause????
	ofxOscMessage m;
	m.setAddress("/object");
	m.addIntArg(distance);
	sender.sendMessage(m, false);
}

//--------------------------------------------------------------
void ofApp::draw() {

std::cout << "distance: " << distance << endl;	//writes the distance in mm on command window
    //this writes the distance value on the console allright

}

RECEIVER
//--------------------------------------------------------------
ofApp.h
(hashtag) define PORT 12345
int distance;
ofxOscReceiver receiver;

//--------------------------------------------------------------
void ofApp::setup()
cout << "listening for osc messages on port " << PORT << “\n”;
receiver.setup(PORT);
distance = 0;
//--------------------------------------------------------------
void ofApp::update()

while (receiver.hasWaitingMessages()) {
	ofxOscMessage m;
	receiver.getNextMessage(m);

	if (m.getAddress() == "/object") {
		distance = m.getArgAsInt(0);
	}

}

//--------------------------------------------------------------
void ofApp::draw()

string buf;
buf = "listening for osc messages on port" + ofToString(PORT);
ofDrawBitmapString(buf, 10, 20);
buf = "distance: " + ofToString(distance, 4);
ofDrawBitmapString(buf, 430, 20);

when i do this in receiver, it gives me a dll exception. Does that mean the address is never /object0 or can i not print on console in update?

void ofApp::update()

    while (receiver.hasWaitingMessages()) {
       ofxOscMessage m;
           receiver.getNextMessage(m);

      if (m.getAddress() == "/object") {
	      string buf;
              distance = m.getArgAsInt(0);
              buf = "distance" + ofToString(distance);
             ofDrawBitmapString(hello, 10, 20);
      }

  }

found the error:
need to receive the address of the message. makes sense :slight_smile:
receiver.getNextMessage(&m);
The OscReceiveExample has it without the & though. and it works.
I am not sure why