variable storage on the vex cortex

Hello all, I’ve been trying to make a program that makes a drive code by using shaft encoders instead of code… you push a button while moving the part the motor is attached to and the code records which buttons do what. The main problem is that I don’t know how to store the changes made to the variables after I turn off the cortex… any suggestions on how to store arrays? This is popping up with a lot of other programs of mine.

Thank you

There are ways to do this, but it’s not easy. Which programming language are you using?

robotc nongraphical