it seems like the compile error is complaining about your functions GetPercent0 and GetPercent2. Make sure those functions are checked as Pure functions. You can do this in the Details panel, after clicking on the function (see screenshot):
Edit:
More about functions calls and the Pure keyword can be found in the [docs][1]