Nevermind.... I figured it out. Unfortunately, using a while do loop slows the program down a LOT... so for now I can just use if then statements.... something like this basically...
if (value1 == 1 || tag = 1) {value2=3; tag =1;}
if (value1 == 78 ) {tag =0;}
It just requires 1 more memory address... but that shouldn't be much of a problem for now.
Also... are all those returns declarations necessary? because it seems that if I leave them out, the value is still placed into the memory location. Why is it then that I need those?
P.S. I would LOVE TO declare global variables.... but every time I try the program crashes on me. It doesn't matter if I open a process first or not. Also i've tried it on 2 different computers, and I even just cut and pasted the line from your code to make certain. Even deleting EVERYTHING from the screen, creating a new address, and then just putting the variable declaration in it by itself causes it. Even if I don't check any boxes.