Set field has two specify buttons.
Click the first specify button and select the field you want to recieve this data.
Click the second specify button and enter the expression you want to use to calculate the value to be stored in the field you selected with the first specify button.
Do not enter the semi-colon. Filemaker will add it for you.
Given the description of what you want to do. I suggest looking up auto-entered calculations. This approach does the same operation without any script needed.
Open Manage | Database | Fields
Find the field definition and double-click it.
Click the auto-enter tab
Click the calculated value check box.
Enter your calculation expression
Clear the do not replace existing value check box.
As long as all the fields referenced in your calculation are part of the same table as the field storing the result, this set up will automatically re-evaluate for you each time a value in a referenced field is changed.