I’m working on a project that uses multiple dictionaries, and every time I run the app either in the Companion or a separate emulator, it doesn’t work. Below is a screenshot of the error I get when running it through the companion (if that helps I am running the companion through TestFlight on iOS.) In other emulators I am having issues with values from the dictionary being pulled, resulting in a “not found” messing up some other math blocks. Can anyone help me?
Edit: the FAQ section said to include the source code for my project when having this issue, so I just now did that! game file.aia (159.4 KB)
You have infinite recursion in several procedures.
A procedure should not call itself in general, except in carefully controlled and limitted circumstances. Otherwise your app will sink into a coma until it runs out of memory.
The recursion may be several levels deep. Don’t give birth to your great great grandfather.
Your use of notfound is likely to cause arithmetic errors in your lookups.
Canvas size is not immediately available in Screen1.Initialize.
Wait some milliseconds for it to appear before taking its size.
Use a Timer for that.
Make sure your Companion is up to date.
Exernal Inpuits makes life easier for the Blocks Editor and the reader.
Use Generic blocks more, for health stars loop.
There’s an arithmetic relationship between health points and index into a global list of health star components you could have used.
You have a very fast clock.
Start slow and late for debugging.
See block images for more.
I ran out of time, there may be more.
Thanks for the feedback! I'm relatively new to App Inventor since I am using it for a class, and this is my first major project using it. For this project, I am trying to explore more "advanced" parts of App Inventor I have not used before like generic blocks, for example. I have a few questions about what you said:
Can you explain what you mean by this? I think I understand what it means, but I am having a very difficult time visualizing it and how I would code it.
What would be a good workaround to my recursion issues? I tried to control it to where it would not be infinite, but at least for one of the two instances you labeled, I can see where it can go many levels deep especially because it uses random values to place an ImageSprite.