So pointers do work...?
and... Yes, it will hold the value across function calls. But if you're not too keen on pointers, I would suggest getting more familiar w/ them outside of your AI project. Cuz as we all know, constantly loading and reloading SC and moving files in and out of MPQ editors is a pain in the ass, and pointers can be hairy to work w/ at first. I'd suggest playing around w/ em in C w/ a compiler.
..but what you got there works. In short.. just make sure your not assigning to or dereferencing values out of your arrays range.
and... Yes, it will hold the value across function calls. But if you're not too keen on pointers, I would suggest getting more familiar w/ them outside of your AI project. Cuz as we all know, constantly loading and reloading SC and moving files in and out of MPQ editors is a pain in the ass, and pointers can be hairy to work w/ at first. I'd suggest playing around w/ em in C w/ a compiler.
..but what you got there works. In short.. just make sure your not assigning to or dereferencing values out of your arrays range.