random image in group

hey.

i want to put a random image into a group, but it does not work.

there is my code:

local enemypics = {“z1,png”, “z2.png”}

local enemy = display.newImage(enemypics[math.random (#enemypics)])

then a type of function to call the random images at random position, + move it to the center of the image, inkl rotation.

after that, i have to put all thouse beneath a mask - the mask already exist, but my z1 and z2 image is even over the mask.

i have to put those 2 guys into a group, which already exist, biu i got an error message. whats wrong?

Looks like the first image “z1,png” has a comma instead of a “.” so it will not create the object and cause errors in your code when it tries to access the object. 

Looks like the first image “z1,png” has a comma instead of a “.” so it will not create the object and cause errors in your code when it tries to access the object.