Property setter was expecting a com.google.appinventor.components.runtime.Button component

I made a memory game, and everytime i flip a card it shows a message saying:
Problem with application

Property setter was expecting a com.google.appinventor.components.runtime.Button component but got a IntNum instead.

End Application

Id be very thankful if anyone could help me please.

you are using the advanced button blocks together with an integer value, but you should use a button component instead...

see also A Multiple Choice Quiz: How to work with the advanced features

It would really help if you provided a screenshot of your relevant blocks, so we can see what you are trying to do, and where the problem may be.

To get an image of your blocks, right click in the Blocks Editor and select "Download Blocks as Image". You might want to use an image editor to crop etc. if required. Then post it here in the community.

Taifun


Trying to push the limits! Snippets, Tutorials and Extensions from Pura Vida Apps by icon24 Taifun.

[file:///C:/Users/PC/Downloads/blocks%20(5).png](file:///C:/Users/PC/Downloads/blocks%20(5).png)

My blocks are in portuguese sorry.

My blocks are in portuguese sorry

This is the error it shows

From a quick look at your blocks, you are setting the list Carta with button components here, there and everywhere, but not necessarily at the correct moment in your workflow, which is creating the error. Set this list to a variable which will be created when your app starts, then use it wherever you need to call it.

How do i do that?

well, @TIMAI2 already showed you how to drefine a global variable...
replace the red circles by that global variable...
Unbenannt

Taifun

Hello, Please go into more detail on how you can fix the com.google.appinventor.components.runtime.Button component but got a IntNum instead.
Problem

Show your relevant blocks

The problem is here:
1

These variables are set to numbers:

2