Help me guys (Runtime error with any component block)

memorygame.aia (655.5 KB)

Can you send the block where you are using any component. And also the list associated with it

And where exactly does your error occur?

See the code here
Any_Component.aia (3.1 KB)

get an image of your blocks (→ right mouse click in Blocks area)

check your 2 selected_button variables, you initialized them using a create empty list block and forgot to assign a button component before using the verification procedure

use Do it to debug your blocks, see also tip 4 here https://puravidaapps.com/learn.php
see also Live Development, Testing, and Debugging Tools
Taifun


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

como se asigna un componente de boton? es decir, que tengo que poner para que el error no salga

How is a button component assigned? that is, what I have to put so that the error does not appear

Unbenannt

Taifun


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

sigue apareciendo el error

it looks like you forgot the other variable...

Taifun



ahora aparece este otro

which means, your index in list block returns the value 0, because it could no find the item you are looking for, see also the documentation MIT App Inventor List Blocks

index in list

Returns the position of the thing in the list. If not in the list, returns 0.

btw. if variable1 always is button1 and variable 2 always is buton2 then it does not really make sense to use the advanced blocks...

Taifun

entonces... perdona por ser tan pesado pero no entiendo que tengo que poner para que no me vuelva a salir este error

well... I also don't know...
you might have called your procedure twice?
the first time it worked and the 2 buttons have been removed from the list, then you called the procedure a second time and as the buttons already have been removed, you get the error, because they are not anymore in the list...
you might want to rethink your algorithms...

Taifun


el error se obtiene nada más comenzar la comprobación, es decir, que el error esta al principio y tengo que poner una variable con algo, lo que no se es que algo y lo he probado todo, aunque por lo que he leido creo que se tiene que poner algo de un boton pero tambien he probado y sigue saliendo

bringback.aia (1014.4 KB)

Entontraste alguna solucion???

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.