- Home /
PLEASE WHERE´S THE ERROR?? C#SCRIPT
It sais :¨error CS1520: Class, struct, or interface method must have a return type¨
public class NewBehaviourScript : ModifiedStat {
private bool _known;
public Skill() {
_known= false;
ExpToLevel = 25;
LevelModifier = 1.1f;
}
public bool Known {
get{ return _known; }
set{ _known = value; }
}
}
public enum SkillName {
Melee_Offence,
Melee_Defence,
Ranged_Offence,
Range_Defence,
Magic_Offence,
Magic_Defence,
}
@Chocopop: Some points:
The question title should reflect your question and not "screa$$anonymous$$g" for help.
You should write a bit more about your problem. The error usually tells you the exact line in which the error occurred so you have actually more information than you're telling us. This just makes it more difficult for us just because you're a bit "lazy".
When your question has been solved, mark the correct answer as solution
Don't post comments as answers. An answer should answer the question. If you want to post a comment, there's a "add new comment" button below each post.
Use tags that are related to your question. When you type something the site even suggests already used tags.
If you're too lazy to write an appropriate question be sure the next one won't get approved in the moderation queue and will be deleted.
Answer by robertbu · Jan 04, 2014 at 04:18 PM
On line 4, you need to explicitly say nothing is returned:
public void Skill() {
Your answer
