Property setter was expecting a ImageSprite component but got a Boolean instead.

270 views
Skip to first unread message

Nobody 1337

unread,
Feb 23, 2016, 2:05:43 AM2/23/16
to mitappinv...@googlegroups.com
I'm fairly new to this program and I'm trying to make a mole mash game and I tried following this tutorial: http://appinventor.mit.edu/explore/ai2/molemash-2.html
 
Whenever I run the program I get: Property setter was expecting a ImageSprite component but got a Boolean instead.

I attached my project to the this post and would appreciate any help I can get, thanks. 

Edit: Screenshot of my codeblocks:


molemash_copy.aia

Taifun

unread,
Feb 23, 2016, 9:13:46 AM2/23/16
to MIT App Inventor Forum
If you are asking for help, I recommend you to make it as easy for others to be able to help you ...
You probably will get more feedback then...

which means in your case post a screenshot of your relevant blocks...

To download the aia file, upload it to  App Inventor, open it, do some bug hunting for you, etc... this takes time, and most people will not do that...
Thank you.

Taifun

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

Nobody 1337

unread,
Feb 23, 2016, 9:48:24 AM2/23/16
to MIT App Inventor Forum
Thank-you for the response. I provided my op with the screenshot of my code blocks. 

Abraham Getzler

unread,
Feb 23, 2016, 10:32:14 AM2/23/16
to MIT App Inventor Forum
This board works better with screen shots well trimmed and uploaded as attachments, for posterity.

Regarding your problem, it is a bit of a stumper.
Your app works fine on the emulator.

However, looking at the Designer and the blocks,
there is an opportunity for premature mole-ification
(to coin a term), the movement of a mole to a spot
on a list of sprites that has not been initialized yet.

I'm guessing that setting the mole timer to disabled
in the Designer and not enabling it until after the
list of holes has completed being initialized (in Screen1.Initialize)
might do the trick.

If not, please post a screen scrape (well trimmed)
or the error message.

ABG

Nobody 1337

unread,
Feb 23, 2016, 10:21:08 PM2/23/16
to MIT App Inventor Forum
I tried doing that but got the same error. If it works on yours then could it be my emulator version causing it to fail to run? I attached the screenshots in my post. 
cg5VRUF.png
cnnPDAO.png

Nobody 1337

unread,
Feb 24, 2016, 1:53:09 AM2/24/16
to MIT App Inventor Forum
I got my emulator to work now. I tried updating but it failed and had to reinstall the aiStarter program. The program is working for me now sorta but the moles are not initializing still. 

Nobody 1337

unread,
Feb 24, 2016, 2:12:47 AM2/24/16
to MIT App Inventor Forum
Edit: I got my app to work! All I had to do was change the capitalization of the movemole procedure. I don't know why that would affect it but it worked. 

Abraham Getzler

unread,
Feb 24, 2016, 11:40:41 AM2/24/16
to MIT App Inventor Forum
Thanks for telling us.  
We'll have to watch for that bug.
It's new to us.

ABG

Reply all
Reply to author
Forward
0 new messages