StDoodle
Minion
Forgive me if I'm missing something, but after searching through the master list of ash functions on the wiki, and trying "ashref [rackin'ma'brain]," I'm still unable to come up with more elegant solutions to getting user input of a numerical (or non-boolean, for that matter) input. Mostly, I'm looking for ways to get integer input. So far, the only solutions I've come up with that can be used outside of "main" are:
1) Define & include an external script & main function, where the main function requires & int, but don't supply it. Haven't tested to see if & how this would work, but perhaps...
2) int val; while (user_confirm("Your total is currently " + to_string(val) + "; do you wish to add 1?")) { val = val + 1; }
Both seem kind of clunky, but I just KNOW I'm missing something elementary...
Edit: okay, can't get option 1 to work... hmm...
1) Define & include an external script & main function, where the main function requires & int, but don't supply it. Haven't tested to see if & how this would work, but perhaps...
2) int val; while (user_confirm("Your total is currently " + to_string(val) + "; do you wish to add 1?")) { val = val + 1; }
Both seem kind of clunky, but I just KNOW I'm missing something elementary...
Edit: okay, can't get option 1 to work... hmm...
Last edited: