ID:168293
 
Heres my question, is there a way to allow my players to input a number and repeat a process that many times? I have a very unique system for my game, and need to know if this possible. If it is, could you possibly point me in the right direction to do so, or even show me how to do it. Any help is greatly appreciated.
Not exactly sure what you're asking for, but look up while().
ex:
mob/verb/Choose_A_Number()
var/a=input("Please select a number.","Number Select") as null|num
if(a)
while(a)
process()
a--
sleep(somenumber)
Yes.
mob/verb/Train()
var/Reps = input("How many reps?","Reps") as num
var/I = 1
while(I <= Reps)
//Whatever you want
src << "You train. Rep : [I]"
I++

Or:
mob/verb/Train()
var/Reps = input("How many reps?","Reps") as num
for(var/I,I<=Reps,I++)
//Whatever

That would do the while as many times there are reps.
In response to Mecha Destroyer JD
Thanks for the help guys.