Took about 4 hours to find out that I can't declare variables during a function in C