substract two variables (solved)

hi

i dont remember how to do this, please help.
on both cases give me error …

var myanswer ;
.....
.....
var myanswer = Score_player - 5 ;
PlayerPrefs.SetInt("Player_score", myanswer );

or how to substrac two variables ?
like here ?

var myanswer ;
.....
.....
var myanswer = Score_player - damage  ;
PlayerPrefs.SetInt("Player_score", myanswer );

thanks a lot so much for any help !!!

Both cases seem to be correct, what kind of error are you getting?

thanks for your help.
the error i think is sintaxis…

BCE0051: Operator ‘-’ cannot be used with a left hand side of type ‘Object’ and a right hand side of type ‘int’.

where is my error, and why on unity 4x works perfect ?

Maybe you could try giving “myanswer” a data type :

var myanswer : int;

thanks so much … now is working !!!
use your suggestion and export package and make whole new game with sport package, with visible meta files too.
thanks again