[TABLE] [TR] NinjaScript File Error Code Line Column [/TR] [TR] [TD]CustomRender16.cs[/TD] [TD]The name 'sj' does not exist in the current context[/TD] [TD]CS0103[/TD] [TD]398[/TD] [TD]14[/TD] [/TR] [/TABLE]
Here is my code:
public class General{
public bool noWeighting;
}
public class Symbol :General {
public Symbol(double weight){
Weight = weight;
}
public double Weight {
get{
if(base.noWeighting == true){
return 100;
}
else{
return value;
}
}
set{ Weight = value;}
}
}
protected override void OnStateChange(){
if (State == State.SetDefaults) {
General sj = new General();
sj.noWeighting = false;
Symbol spy = new Symbol(15.25);
}
}
[Display(Name = "No Weighting", Order = 0, GroupName = "General Settings")]
public bool NoWeighting{
get {
return sj.noWeighting; //I am getting the error at this line
}
set{sj.noWeighting = value;} //and another error at this line
}

Comment