func randomroll () {
var time = arc4random_uniform(10)
while(time < 5)
{
time = arc4random_uniform(10)
}
for(var time1 = time; time1>=0; time1--) { //This is where I get the thread error
...
}
}
The error I am getting is Thread 1: EXC_BAD_INSTRUCTION (code=EXC_I386_INVOP, subcode=0x0)
I am a beginner swift programmer and am sure I am missing something obvious, was hoping for some insight. Thank you.