So I’ve been attempting to teach myself some c# through Youtube tutorials, and is going pretty well. Until I came across this in my CharacterGenerator. It keeps telling me that I have these two errors:
1.CharacterGenerator.cs(20,27): error CS1547: Keyword ‘void’ cannot be used in this context
2. CharacterGenerator.cs(20,28: error CS1525: Unexpected Symbol ‘(’, expecting ‘)’, ‘,’, ‘;’, ‘[’, or ‘=’
But I can’t figure out what the error actually is/ how to fix it. On top of that whenever I try to attach my code to the main camera, it says:
“Can’t add script
Can’t add component ‘CharacterGenerator’ because it does not exist.Check to see if file name and class name match.”
It says that with all my scripts. Is that just because of my current errors with this script?
Below is my script for the CharacterGenerator:
1719069–108437–CharacterGenerator.cs (2.45 KB)