I tried to upload this sketch it contains vibration detector with other different detectors, but I have this problem that I don't understand in the void loop section of the vibration sketch

The error is pretty clear. You have a function, virbration() that returns a long value. The second line of the function does just that. Everything else after that never gets executed, but the compiler sees (one line 153) a bare return statement

// Check if any reads failed and exit early (to try again).
if (isnan(h) || isnan(t)) {
Serial.println("Failed to read from DHT sensor!");
return;
...

and complains about it.