Custom calculating two auto populated fields based on a drop down selection?
Hello all. I'm making a custom D&D character sheet with auto populated fields. However, I'm having trouble with one specific part. I've made a drop down list (F1) with a selection of classes. Based on which class is chosen, the saving throws (F4) should be auto populated by adding ability modifiers (F2) and prof bonus (F3). Both F2 and F3 are also auto populated based on other fields. Heres the example of what I've got so far -
Var Pro=this.getField("PB").value;
Var St=this.getField("Strength").value;
Var De=this.getField("Dexterity").value;
Var Co=this.getField("Constitution").value;
Var In=this.getField("Intellegence").value;
Var Ch=this.getField("Charisma").value;
Var Wi=this.getField("Wisdom").value;
if(event.value==Barbarian){
this.getField("SavS").value=Pro+St;
this.getField("STD").value=De;
this.getField("STCo").value=Co;
this.getField("STI").value=In;
this.getField("STCh").value=Ch;
this.getField("STW").value=Wi;
}This shows the example with only one class, but you get the point. My problem arrises with the Vars, it keeps showing as 'SyntaxError: missing; before statment 1: at line 2'. I would like to simplify this and just learn it, so if anyone has any advice I would appreciate it!
