2016년 12월 8일 목요일

Coding errors for mini game


My code is saying "The operation + cannot accept the arguments: [*empty-string*][1]" but i used the code before and it worked perfectly. Also, I used one code for two different screens, but only one screen works. I would like to know if it is a glitch on the website or if I did the code wrong.

-- 
You did not post an image of your relevant blocks Kitkat so any advice is a huge guess.  It appears you have a Math addition block somewhere in your code and the value is blank.  Have you done a DoIt with your code?  That should help you find the value that is not showing a numerical value.   If you post an image of you blocks you will get specific advice.

You used the same code on two different screens.  Perhaps the code is not really identical or the code depends on a value on the other screen?  Whatever is happening, it is most probable it is not a 'glitch' on the website.   It could be a coding error  or you might not have passed a variable value correctly between screens (You do know that to use a value from one screen on another you have to 'pass that value' to the second screen using a TinyDB probably, depending whether you are passing a single value or many values.

Again, post some block images and someone will look at your code and please do a DoIt.   see http://www.appinventor.org/bookChapters/chapter15.pdf for DoIt and other methods to debug your app.


-- 
 minigame_cofing.jpg 
This is the coding. Sorry I did not post the picture before.

-- 
1. OK, thanks for the blocks.  You did not do a DoIt so we cannot see what is happening with  score.text +  -1
2.  you appear to have two 'unlocked' blocks... is this true?
 minigame_coding.jpg

3. You do not show how frequently Clock1 'fires'.  What interval are you using ... remember, the interval value is in ms; you might be using the clock too quickly.  You have a lot of blocks to execute in your timer.

You might 'fix' the unlocked blocks and try again   and or post an image with a DoIt.

-- 


댓글 없음:

댓글 쓰기