One line of code does not want to work! why?

I keep trying to make a melee weapon system for my first person character to use (here is the line of code “var TheDamage : int - 50;”). but for some reason I keep getting this message on the error list “Assets/MeleeSystem.js(3,20): UCE0001: ‘;’ expected. Insert a semicolon at the end.”

Can someone please help me figure out what the heck is wrong here?

P.s. when I try to do what it suggests I get this back:

“Assets/MeleeSystem.js(3,22): BCE0034: Expressions in statements must only be executed for their side-effects.”

Again please help me. :frowning:

Use this if you’re trying to assign the variable:

var TheDamage : int = 50;

Ps: Please use the “[.code]” and “[./code]” tags without the periods before rapid eye bleeding occurs.

~lanDog

1 Like

Thank you so much! that worked perfectly!

Im haveing a problem to this comes up Assets/meleesystem.js(3,18): UCE0001: ‘;’ expected. Insert a semicolon at the end. PLZ HELP

Code sample? Without code we can only tell you you’ve made a syntax error.

http://bit.ly/18J67RC