js "Cannot convert 'String' to 'int'." error

Help i’m getting this error:

Ball.js(9,19): BCE0022: Cannot convert ‘String’ to ‘int’.

Here is that part of the script:

var max_speed:int;
private var n_max_speed:int;
private var s_max_speed:int;
s_max_speed = "-" +max_speed.ToString(); // line 9
n_max_speed = parseInt(s_max_speed);

The problem is that you convert max_speed to a string and then try to put in a int variable. I guess you want to put s_max speed to the negative of the max_speed? If so you can do like this instead:

s_max_speed =- max_speed