简体   繁体   English

预期返回 CGPoint 的函数中缺少返回值

[英]Missing return in a function expected to return CGPoint

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所以我是编码新手,一直在尝试创建一个名为 zig zag 的游戏,但我一直在看的教程有点旧并且遇到了很多问题,但到目前为止最烦人的是我一直收到错误消息“预期返回 CGPoint 的函数中缺少返回值”,并尝试了几个小时来修复它,但没有运气,想知道是否有人新来做什么

在此处输入图片说明

Check your braces are balanced.检查您的牙套是否平衡。 Select All your code (Cmd + A) and format it by using keyboard shortcut Ctrl + i.选择所有代码 (Cmd + A) 并使用键盘快捷键 Ctrl + i 对其进行格式化。 Then check curly braces in your code.然后检查代码中的花括号。 Think you have an additional closing brace.认为你有一个额外的结束括号。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM