'requestEvent' is not declared in this scope

these are the error messages that I'm getting:

Arduino: 1.8.8 (Windows 7), Board: "Arduino/Genuino Uno"

181224_weatherstation__with_prediction_.ino: In function 'void setup()':

181224_weatherstation__with_prediction_:117:18: error: 'requestEvent' was not declared in this scope

   Wire.onRequest(requestEvent); // register event

                  ^
181224_weatherstation__with_prediction_.ino: In function 'void rainPrediction()':

181224_weatherstation__with_prediction_:521:25: error: a function-definition is not allowed here before '{' token

     void requestEvent() {

                         ^

181224_weatherstation__with_prediction_:547:27: error: a function-definition is not allowed here before '{' token

       void requestEvent() {

                           ^

181224_weatherstation__with_prediction_:555:27: error: a function-definition is not allowed here before '{' token

       void requestEvent() {

                           ^

181224_weatherstation__with_prediction_:563:27: error: a function-definition is not allowed here before '{' token

       void requestEvent() {

                           ^

181224_weatherstation__with_prediction_:571:27: error: a function-definition is not allowed here before '{' token

       void requestEvent() {

                           ^

181224_weatherstation__with_prediction_:579:27: error: a function-definition is not allowed here before '{' token

       void requestEvent() {

                           ^

181224_weatherstation__with_prediction_:587:27: error: a function-definition is not allowed here before '{' token

       void requestEvent() {

                           ^

181224_weatherstation__with_prediction_:595:27: error: a function-definition is not allowed here before '{' token

       void requestEvent() {

                           ^

181224_weatherstation__with_prediction_:603:27: error: a function-definition is not allowed here before '{' token

       void requestEvent() {

                           ^

181224_weatherstation__with_prediction_:611:27: error: a function-definition is not allowed here before '{' token

       void requestEvent() {

                           ^

181224_weatherstation__with_prediction_:616:28: error: expected identifier before 'if'

     else if (prob > 90) && if ( < 100) {

                            ^

exit status 1
'requestEvent' was not declared in this scope

This report would have more information with
"Show verbose output during compilation"
option enabled in File -> Preferences.

from what I gathered from other similar topics, I'm missing brackets, though I can't seem to find what's missing. If there is any other issue with the code that I should correct please help me point that out too. thank you.

also my code exceeded the maximum allowed length and i cant post it so I'm attaching it.

181224_weatherstation__with_prediction_.ino (19.8 KB)

This does not make sense and it appears in several places

      if (prob <= 10) {
            // function that executes whenever data is requested by master
            // this function is registered as an event, see setup()
            void requestEvent() {
                Wire.write("1"); // respond with message of 1 byte
                // as expected by master
            }
        }

I think you are trying to create a function called requestEvent() and if so it should not be inside any other function and it should only be defined once.

I think the purpose of the function is to provide an action that happens when the Wire library receives data. However all your function does is send the character '1'. It does not seem to do anything with any data that may have been received.

...R