I have found the answer myself. The if statements where more than 4 levels deep
kinda, but look a this part of your code really closer

Code:
if (word_wachttijd_aantal < 11) and (byte_status == 1) then
   if adcon0.2 == 0 then                   ' test AD conversion ready
      word_temp_int.highbyte = ADRESH      ' store AD value
      word_temp_int.lowbyte = ADRESL       ' store AD value
      word_pot_adc = word_pot_adc * 9      ' some calculations
      word_pot_adc = word_pot_adc + word_temp_int
      word_pot_adc = word_pot_adc / 10
   endif
   adcon0.2 = 1                            ' start new AD conversion
endif
in clear if you A/D conversion is not ready you begin a new one...
Simple to modify...

Code:
if (word_wachttijd_aantal < 11) and (byte_status == 1) then
   while ADCON0.2    'wait until AD conversion is ready
          pause 5
   Wend
      word_temp_int.highbyte = ADRESH      ' store AD value
      word_temp_int.lowbyte = ADRESL       ' store AD value
      word_pot_adc = word_pot_adc * 9      ' some calculations
      word_pot_adc = word_pot_adc + word_temp_int
      word_pot_adc = word_pot_adc / 10
   adcon0.2 = 1                            ' start new AD conversion
endif
IF THEN statement don't use stacks... SO you can use as many level you want... SUBs use stacks