I am running the following code fine on both Windows and MacOS. It crashes, however, when I run on iOS. The iOS error states "instance_create_layer argument 2 incorrect type (undefined) expecting a Number (YYGF)).
.
I have paraphrased the code for brevity.
global.object_array[0] = obj_one;
var inst;
if instance_exists(global.object_array[0])
{
obj_one.x = global.location_array[0].x;
obj_one.y = global.location_array[0].y;
}
else
{
inst = instance_create_layer(global.location_array[0].x, global.location_array[0].y, "Layer", global.object_array[0]);
global.object_array[0].sprite_index = global.sprite_array[1,2];
global.object_array[0].image_index = 0;
}
I am running:
IDE 2.1.5.322
Runtime 2.1.5.246
I have tried both Xcode 9 and 10 beta as well as the last iOS 11 and now iOS 12. All the same error.
.
I have paraphrased the code for brevity.
global.object_array[0] = obj_one;
var inst;
if instance_exists(global.object_array[0])
{
obj_one.x = global.location_array[0].x;
obj_one.y = global.location_array[0].y;
}
else
{
inst = instance_create_layer(global.location_array[0].x, global.location_array[0].y, "Layer", global.object_array[0]);
global.object_array[0].sprite_index = global.sprite_array[1,2];
global.object_array[0].image_index = 0;
}
I am running:
IDE 2.1.5.322
Runtime 2.1.5.246
I have tried both Xcode 9 and 10 beta as well as the last iOS 11 and now iOS 12. All the same error.