Issue with Invoke

Hey,

My code was working fine until i started using invoke, when it threw up an error saying that the method i was invoking could not be called. Ive gone through the code and cant seem to see what the issue is. Any help appreciated.

Hi Soaky,

Welcome to our community! :slight_smile:

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.

Make sure your methods are not wrapped in the code block of another method. Also check the spelling of the method you’d like to invoke with Invoke. 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:

Hey, ill make sure i do that in future thanks. Ill have another look at it, it may just be a typo somewhere.

If you cannot find the problem, here’s a hint: Check the position of the curly brackets. Compare them to Rick’s code if necessary.

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

Privacy & Terms