Have you run in debug mode to see if any JS errors are thrown? Maybe try using "show_message" every iteration to find exactly where it crashes? EG:
{ with(exerciseGenerator) { var exercise, odds, operator, total; exercise = instance_create(argument0, argument1, obj_duck); odds = random(100); operator = ds_map_find_first(percentages); total = ds_map_find_value(percentages, operator); while(odds > total) { operator = ds_map_find_next(percentages, operator); total += ds_map_find_value(percentages, operator); show_message("No crash!#operator=" + string(operator) + "#total=" + string(total)); }
Hi Nocturne, I cannot run it in debug mode as it crashes before I can scroll down the box.
Also did the show message, and it gave as a result:
No crash!
operator=-
No crash!
operator=*
total=0.75
No crash!
operator=/
total=1
No crash!
operator=0
total=1
Mike might be right it has something to do with the ds_map_find_next() or maybe the iteration itself?
Any suggestions are welcome!



Find content
Male
