If you create a simple control with nine or more input tokens, the logic skips over assigning the hour variable and EPANET will activate the control at hour zero.
EN_saveinpfile was incorrectly saving the index of the GPV head loss curve inside of a simple control instead of the control status
EN_geterror doesn't take in the project wrapper, and you need to include maxLen