我有类 Player
@interface Player : NSObject{...}
-(int) setAttack:(int)MonsterNumber;
Player.m
-(int) setAttack:(int)MonsterNumber{...
return damage;
}
但是,当我运行此程序时,我收到错误“Player.h:28:1: error: type of setter must be void [3]”我收到此错误 3 次。
感谢您的帮助 :-)
我有类 Player
@interface Player : NSObject{...}
-(int) setAttack:(int)MonsterNumber;
Player.m
-(int) setAttack:(int)MonsterNumber{...
return damage;
}
但是,当我运行此程序时,我收到错误“Player.h:28:1: error: type of setter must be void [3]”我收到此错误 3 次。
感谢您的帮助 :-)