Without bool

hi , i am sharing a piece of code where i am putting my package deleivered msg in the if loop of “package”, but i doesn’t print the msg "Package deleiver " to the console when i hover over customer tagged object .
image

Hi Aman,

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.

Your second if-statement is wrappes in the first if-statement. This means that the tag must be “Package” and “Customer” to make the program execute the last Debug.Log. Fix the position of the curly brackets. Remember you can also look at the lecture code changes via the link in the Resources of each lecture.

Hope this helps. :slight_smile:


See also:

1 Like

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

Privacy & Terms