9 Replies
I bet if you were to separate those out into separate lines it would highlight the one with the issue.
also youre assigning to the locals
oh wait you arent, the naming convention is flipped lol
This code looks fine, though it could be cleaned up a lot.
As mentioned, it would help a lot with readability if you put all of the statements in the constructor on their own lines.
the line that errors isnt in the snippet
in this line error on "SniperFireSound" and "SniperReloadSound"
the error is for a field initializer
so on a line that initializes a field
ik
it looks like the error isn't in the weapon class but in whatever class is calling new
Weapon("Sniper...)
- the line of code I replied toWas this issue resolved? If so, run
/close
- otherwise I will mark this as stale and this post will be archived until there is new activity.