Pictures are not shown in memory game Please help

Hello, I created a memory game with a YT tutorial, but my images are not shown, I already try some hours. Could someone please help? Thanks! In the next few hours I am not online, but later in the evening again. Thanks!
Best,
Martina


Culture_Memory_Germany.aia (872,8 KB)

I peeked into your assets folder to see why you duplicated image files in pairs.
image

It actually makes the programming harder, compared to just keeping a list of 8 image files and reusing them in each pair.

See Can you please help me I can't find the error - #6 by ABG
for a working sample.

Show us the link?

Good evening,
Thank you ABG. Here is the tutorial link:

But unfortunately, still I do not understand the issue. Did I count the images wrong in the programming part? In the tutorial they have six different images. I have discalculation problem in math and even if it is easy, so it can happen, that I count wrong. Sorry!
Tomorrow, I will have a closer look on your answers and on the app in appinventor2. Thank you very much!
Best,
Martina

A free floating local init won't ever run.
image

It must be part of an event block, or part of a procedure called from an event block.

Also, comparison of the pictures of the flipped cards will never match, because you made all the picture names unique by adding 1 and 2 to the picture names.

Dear ABG, Thank you. I put now the initialise cards block with the buttons in a procedure with the name "createList". But the issue with the pairs I do not understand. Every card has to be online twice for a pair, but if they have the same names, then the system will overwrite the first image with the same image name. Could you please tell me, how I should name the images? This was not shown in the video tutorial. Thank you very much!
Best,
Martina

Now it looks like this:

Study this working sample.

Dear ABG, Thank you. In meantime, I deleted the xy-image2.png and made a double entry in the list of images in this way:

brandenburger1.png
brandenburger1.png
brezel1.png
brezel1.png

and created a procedure for the loose part of the block you have mentioned. It looks like this (but still there is an issue with the images, please have a look at the screenshot):


Of course, I will have a look at the working match game. Thanks!
Best,
Martina

Here is an experiment for you to run.

Start the game in the Companion , and before flipping the first card, apply Do It in the blocks editor against a block that gets the global variable cardpairs.

Show us what you see.

Also, make sure that Clock_Timer is disabled in the Designer.