title: Error in Oracle procedure, object is invalid
body: <p>Where is the bug? Compilation ends with errors and I have no idea where I'm going wrong.</p>
  
  <pre><code>create or replace
  PROCEDURE make_payoff(user_id_argument number) 
  is
  begin
  payoff_amount:= 0;
  CURSOR Clicks IS
      SELECT c.cpc FROM click as c JOIN widget w ON w.id = c.widget_id JOIN website web ON web.id = w.website_id WHERE web.user_id = user_id_argument AND c.payoff_id IS NULL;
  BEGIN
  FOR Click IN Clicks
  LOOP
      payoff_amount:= payoff_amount + Click.cpc;
  END LOOP;
  
  INSERT INTO payoff (user_id, amount) VALUES (user_id_argument, payoff_amount);
  COMMIT;
  end;
  </code></pre>
  
  <p>I'm getting:</p>
  
  <pre><code>ERROR at line 1:
  ORA-06550: line 1, column 7:
  PLS-00905: object S10306.MAKE_PAYOFF is invalid
  ORA-06550: line 1, column 7:
  PL/SQL: Statement ignored 
  </code></pre>
  
  <p>EDIT:
  I've fixed Cursor name but error is the same</p>