Bug In My Game

I appear to have made an infinite loop with my spawner. If anyone knows GM:S, I could use a little help. Here is my Object Info:

Information about object: obj_spawner

Sprite:
Solid: false
Visible: true
Depth: 0
Persistent: false
Parent:
Children:
Mask: No Physics Object Create Event:

execute code:
 
 randomize()
 wolf = irandom_range(1,10)
 
 people = irandom_range(1,20)
 
 if (!object_exists(obj_player)){
 instance_create(x,y,obj_player)
 }
 
Step Event:

execute code:
 
 do
 {
 wolf -= 1
 were = instance_create(x,y,obj_werewolf)
 were.x = (irandom(1920))
 were.y = (irandom(1080))
 }
 until (wolf =0);
 do
 {
 people -= 1
 ppl = instance_create(x,y,obj_person)
 ppl.x = (irandom(1920))
 ppl.y = (irandom(1080))
 }
 until (people = 0);
 

Comments

Grahhhhh
16. Apr 2016 · 21:55 UTC
Not familiar with gms or the syntax. Was waiting to see if other people weighed in on this… Any chance you need to add a space to the until line in wolf?

until (wolf = 0);

Also have you checked the value of wolf once assigned? If there’s any possibility of it being 0 or lower when entering the loop, the loop is only checking for = 0, what’s the harm of changing it into =<? :)
Squid
16. Apr 2016 · 21:56 UTC
I’m not sure what GM:S is but does it help if the line:

until (people = 0);

Is changed to:

until (people == 0);
squigglez
16. Apr 2016 · 22:06 UTC
edit: thanks to some glorious people on the IRC, the bug is fixed!