Turbulence421
Member
Hello. For some reason, I can't access the id of a background layer that I create. Three simple lines of code and I'm getting a message saying "-1" instead of the layer background id. I must be missing something obvious but I can't figure out what it is.
id1 = layer_create(500500)
layer_background_create(id1,back_hills)
show_message(string(layer_background_get_id(id1)))
I know I can store the layer background id into a global variable when I create it, but I'd rather not do that and I want to understand why this code is returning "-1" instead of the layer background id.
id1 = layer_create(500500)
layer_background_create(id1,back_hills)
show_message(string(layer_background_get_id(id1)))
I know I can store the layer background id into a global variable when I create it, but I'd rather not do that and I want to understand why this code is returning "-1" instead of the layer background id.