Declaring "Error" in an arcade game code

Hi Everyone,

I am working on this project from this site: GitHub - gradyh/Arduino-Arcade-Puzzle-Box: Arduino-powered arcade-style mini game puzzle box.

This is the first project I am making since some months ago and I can’t figure it out. When I check the code I get the next message:

Arcadegame:206: error: ‘error’ was not declared in this scope

if (pow(coeff[0] * u(coeff[0]) + coeff[1] * u(coeff[1]) + coeff[2] * u(coeff[2]) + coeff[3] - fMax, 2.0) > .01) error(“Problem with inital coefficient selection.”);

^

Arcadegame:209: error: ‘error’ was not declared in this scope

if (pow(-coeff[0] * v(coeff[0]) - coeff[1] * v(coeff[1]) - coeff[2] * v(coeff[2]) + coeff[3], 2.0) > .01) error(“Problem with inital coefficient selection.”);

^

Arcadegame:281: error: ‘error’ was not declared in this scope

if (goalPotValue < 0.0 || goalPotValue > 1.0) error(“Goal potentiometer value out of bounds”);
* ^*
Arcadegame:285: error: ‘error’ was not declared in this scope
_ if (pow(goal[0] - coeff[0] * goalPotValue[0] - coeff[1] * goalPotValue[1] - coeff[2] * goalPotValue[2] - coeff[3],2) > 0.001) error(“Goal potentiometer values are not a solution with given coefficients.”);_
* ^*
exit status 1
‘error’ was not declared in this scope
I have attached the file to the topic. I think it is something simple, but I can’t find it… :slight_smile:
Thanks!
Arcadegame.ino (16.1 KB)

Well, where is “error” declared?

Can you see now why we ask you to post code in code tags?

Using pow(n, 2) to calculate n * n is incredibly wasteful.