So I'm new to coding and have been trying to create a game called zig zag but the tutorial I've been watching is kind of old and have been running into numerous problems but the most annoying so far is this I keep receiving the error message "Missing return in a function expected to return CGPoint" and have tried for hours to fix it with no luck and was wondering if anyone new what to do
Asked
Active
Viewed 231 times
-1
-
3add your code not code image. – dahiya_boy Feb 12 '18 at 05:51
-
2By the way you have extra close braces. – dahiya_boy Feb 12 '18 at 05:52
-
please format your code. Ref : https://stackoverflow.com/questions/6543026/how-to-format-code-in-xcode – Jayesh Thanki Feb 12 '18 at 05:54
-
it will help you to find extra braces. – Jayesh Thanki Feb 12 '18 at 05:54
-
2Press ⌘A and then ⌃I to reindent the code. Then you might see the problem (unbalanced or badly balanced braces). – vadian Feb 12 '18 at 05:55
1 Answers
0
Check your braces are balanced. Select All your code (Cmd + A) and format it by using keyboard shortcut Ctrl + i. Then check curly braces in your code. Think you have an additional closing brace.

SelvamSankarans
- 169
- 9