Struggling to find the fault in my code - not counting blocks

Hi,

I’m hoping someone can spot the fault here. I thought I’d copied it exactly but the blocks aren’t being counted so I’m doing something wrong that I can’t spot.

Thanks in advance for anyone that can spot the fault.


Hi Redbrit,

Please note, it’s better to copy/paste your code and apply the code fencing characters, rather than using screenshots. Screenshots are ideal for displaying specific details from within a game engine editor or even error messages, but for code, they tend to be less readable, especially on mobile devices which can require extensive zooming and scrolling.

You also prevent those that may offer to help you the ability to copy/paste part of your code back to you with suggestions and/or corrections, meaning that they would need to type a potentially lengthy response. You will often find that people are more likely to respond to your questions if you make it as easy as possible for them to do so.

Have you already compared your code to the Lecture Project Changes which can be found in the Resources of this lecture? Are there any error messages in your console?

Hope this helps :slight_smile:


See also;

Thanks for the posting advice Nina, I’ll remember that for next time.

I don’t know how but my code started working. I deleted a line or two and rewrote it but it’s exactly the same so no idea what I did.

Cheers

Maybe the script were not saved correctly, or there was an issue with the cache in Unity. If the problem solved itself, don’t worry about it anymore. :slight_smile:

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

Privacy & Terms