# Fatal error in Game Maker: variable not set before reading it

I have been following the tutorial videos on game maker, and I am at the part where he explains how to get the bullet under the character. I thought I did everything right. He then tested the game, and it worked. But when I played, and tried to shoot, this message appeared:

#

FATAL ERROR in action number 1 of Step Event0 for object obj_player:

Variable obj_player.layer_bullet(100002, -2147483648) not set before reading it. at gml_Object_obj_player_Step_0 (line 30) - instance_create_layer(x, y, layer_bullet, obj_bullet);

#
• Have you created a layer with name layer_bullet in room or using layer_create() function? – Dmi7ry Sep 10 '17 at 6:06

instance_create_layer(x, y, "layer_bullet", obj_bullet