user63553: // After 2 seconds have passed, stop ignoring the button.
  // If the button is pressed, call the checkbutton function.
  if (millis() > ignore && digitalRead(0) == LOW)
  {
    checkbutton();
  }
}
// This function waits for the button to be released,
// then waits for it to be pressed to start the next run.
void checkbutton(){
  delay (50);  // Button pressed, debounce.
  while (digitalRead(0) == LOW) // While button is pressed,
  {}                            // do nothing while waiting.
  delay (50);                   // Button pressed, debounce.
  while (digitalRead(0) == HIGH)// While button is released,
  {}                            // do nothing while waiting.


  ignore = 2000 + millis();     // Set the now ignore time,
}                              // and return to the main loop.


user35430: You are using checkbutton() before you have told the program what checkbutton() is.
You need to move the whole method definition void checkbutton(){ ... } more to the top, i.e. in front of any call to it (checkbutton();).
Another option would be a forward declaration, but I doubt it's widely used in Arduino projects.

63553: <pre><code>// After 2 seconds have passed, stop ignoring the button.
  // If the button is pressed, call the checkbutton function.
  if (millis() &gt; ignore &amp;&amp; digitalRead(0) == LOW)
  {
    checkbutton();
  }
}
// This function waits for the button to be released,
// then waits for it to be pressed to start the next run.
void checkbutton(){
  delay (50);  // Button pressed, debounce.
  while (digitalRead(0) == LOW) // While button is pressed,
  {}                            // do nothing while waiting.
  delay (50);                   // Button pressed, debounce.
  while (digitalRead(0) == HIGH)// While button is released,
  {}                            // do nothing while waiting.


  ignore = 2000 + millis();     // Set the now ignore time,
}                              // and return to the main loop.
</code></pre>
 35430: <p>You are using <code>checkbutton()</code> before you have told the program what <code>checkbutton()</code> is.</p>

<p>You need to move the whole method definition <code>void checkbutton(){ ... }</code> more to the top, i.e. in front of any call to it (<code>checkbutton();</code>).</p>

<p>Another option would be a <a href="https://en.wikipedia.org/wiki/Forward_declaration" rel="nofollow noreferrer">forward declaration</a>, but I doubt it's widely used in Arduino projects.</p>
