V
vleermuis2003
Guest
i am very new to programming and so i am following a tutorial to learn the beginnings.
but now i made a gun and a bullet, this bullet contains 2 frames.
but when i am in the game and i shoot the game crashes and the Memory usage skyrockets to over 3GB while my game freezes. after that i get this error message:
___________________________________________
############################################################################################
FATAL ERROR in
action number 1
of Step Event0
for object objectGUN:
Memory allocation failed: Attempting to allocate 201326592 bytes
at gml_Object_objectGUN_Step_0 (line 6) - while(instance_create_layer(x,y,"BULLET",ObjectBULLET))
############################################################################################
--------------------------------------------------------------------------------------------
stack frame is
gml_Object_objectGUN_Step_0 (line 6)
i don't know what to do at this point so could someone maybe pleas help me out with this?
my code where the FATAL ERROR encounters:
if you need anything else to help me out pleas tell me!
but now i made a gun and a bullet, this bullet contains 2 frames.
but when i am in the game and i shoot the game crashes and the Memory usage skyrockets to over 3GB while my game freezes. after that i get this error message:
___________________________________________
############################################################################################
FATAL ERROR in
action number 1
of Step Event0
for object objectGUN:
Memory allocation failed: Attempting to allocate 201326592 bytes
at gml_Object_objectGUN_Step_0 (line 6) - while(instance_create_layer(x,y,"BULLET",ObjectBULLET))
############################################################################################
--------------------------------------------------------------------------------------------
stack frame is
gml_Object_objectGUN_Step_0 (line 6)
i don't know what to do at this point so could someone maybe pleas help me out with this?
my code where the FATAL ERROR encounters:
GML:
firingdelay = firingdelay -1;
if (mouse_check_button(mb_left)) and (firingdelay < 0)
{
firingdelay = 5;
while(instance_create_layer(x,y,"BULLET",ObjectBULLET))
{
speed = 20;
direction = other.image_angle;
image_angle = direction;
}
}