Compilation error Yail Compiler -DX execution failed

I’m making an quiz App with 20 random questions, I have tried to reduce as much as possible redundancy and have been compiling it adding one block at the time. Blocks are very similar though when I add a similar block to the one that has already not caused problems the compiling process gives me an error. I am using one screen with 20 virtual screens controlling its visibility depending on the users input. The layout for all the questions is the same just the behavior is different. When I connect the AI Emulator the App works fine. My .aia file is 925 KB. Please help I’m making this App to help people during this pandemia.

I’m attaching a screen capture including all my blocks, additionally there is an expanded view of one group of blocks.

why don't you use only one virtual screen and just change the quesiton and corresponding answers?
Like this you could have hundreds of questions...
see also App Inventor Tutorials and Examples: Advanced Features | Pura Vida Apps

DRY - Don't repeat yourself... and separate logic and data...

Taifun


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

You can do a lot with a table.

How many screens and components did this app need to let the user find their way from the Big Bang to MIT?

Thank you very much for your advice, I’ll look into it.

Great example, thank you very much for the info :slight_smile:

I’ve going through the example you indicated and have been able to hiperreduce my blocks, though when using Any component how can I exclude 1 button from being affected by the the Any component code? In other words I have 7 buttons, 6 of them change background color randomly and the 7th button does something different and should be excluded from changing background color. Here are my blocks.

Never mind, I just figured out how to get the behavior I want, here are the blocks

1 Like

yes exactly… this is the purpose of notAlreadyHandled
Taifun

Thank you very much :slight_smile:

I have looked at your example at https://puravidaapps.com/quiz.php and have been able to adapt it to my project. I have two virtual screens, one is wrongAnswer and the other one is rightAnswer, when the user clicks the button with the right answer the resulting text which is included in a list should display in the corresponding screen, likewise when the user selects a wrong answer the corresponding text along with an image and a button to an external page should display in the wrongAnswer virtual screen. I have been trying to come up with the corresponding logic unfortunately I have reached a dead end. Do you have any suggestions as to how I should approach this?

Based on your example and since I have three buttons I made three lists and I am adding the answer from the corresponding button into the the corresponding list an comparing the response then based on the result I’ll fill in the information in the corresponding virtual screen - wrongAnswer or rightAnswer - Do you think this approach should work?

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.