Changes

Jump to navigation Jump to search
7 bytes added ,  15:31, 4 February 2020
Line 274: Line 274:     
You can either write your scripts directly in your [[TyD|TyD]] file as such:
 
You can either write your scripts directly in your [[TyD|TyD]] file as such:
  Script_EndOfDay "if (Product.GetCashflow(false).Last()>100) {Product.DevCompany.MakeTransaction(-Product.GetCashflow(false).Last()*0.1, Bills);}#Pay 10% of income if income is more than $100"
+
  Script_EndOfDay "if (Product.GetCashflow(false).Last() > 100) { Product.DevCompany.MakeTransaction(-Product.GetCashflow(false).Last() * 0.1, Bills); } #Pay 10% of income if income is more than $100"
 
Or you can put your script in separate files and refer to them relative to your mod root folder, by starting with a forward slash:
 
Or you can put your script in separate files and refer to them relative to your mod root folder, by starting with a forward slash:
 
  Script_EndOfDay "/Scripts/MyScript.txt"
 
  Script_EndOfDay "/Scripts/MyScript.txt"

Navigation menu