N
Nitex
Guest
GMS1.
So I'm at a loss on this one. The bug here is that choose is choosing numbers that do not exist in my list. Choose(x_range) and choose(y_range) are both picking wildly huge integers - like 9998 or 2248, for no discernible reason. It should currently only be able to choose 10 as the value in either case. So where on earth is it getting other numbers from? I must be missing something incredibly obvious, but it's not even picking 10. I tried adding a second value, same thing happened. The for loop that prints it correctly prints 10 one time.
So I'm at a loss on this one. The bug here is that choose is choosing numbers that do not exist in my list. Choose(x_range) and choose(y_range) are both picking wildly huge integers - like 9998 or 2248, for no discernible reason. It should currently only be able to choose 10 as the value in either case. So where on earth is it getting other numbers from? I must be missing something incredibly obvious, but it's not even picking 10. I tried adding a second value, same thing happened. The for loop that prints it correctly prints 10 one time.
GML:
var x_range = ds_list_create()
ds_list_add(x_range,10)
var y_range = ds_list_create()
ds_list_add(y_range,10)
for (var i = 0; i < ds_list_size(x_range); i+=1) {print(x_range[|i])}
print("AAAAAAAAAAAAAAAAAAAAA: ",choose(x_range))
print("AAAAAAAAAAAAAAAAAAAAA: ",choose(x_range))
print("AAAAAAAAAAAAAAAAAAAAA: ",choose(x_range))
print("AAAAAAAAAAAAAAAAAAAAA: ",choose(x_range))