Calling variables from other script

I have these 2 scripts in which im calling 2 variables from 1 script to another, one of them is working other one isn’t what is the problem

 Script 1 - CubeControl.js
 static var canWalk = true;
 static var canDie = false;
 Script 2 - Spikes Kill.js
 CubeControl.canWalk = false;
 CubeControl.canDie = true;

This is just short part of the script. So i have been using only canWalk variable it was working fine and still is, but now added another canDie and when call that var from the other script(spikes kill) its saying canDie is not member of ‘CubeControl’. How can i fix this?

Make sure that CubeControl.js is saved and you don’t see an asterisk(*) next to the file name tab. You may want to rebuild the scripts in mono develop to ensure you get a fresh set of assemblies. Since you’re using static variables the variable is a class member(or script member if that easier), you can access it just as you are so long as the associated built assemblies have this built out.