javascript not working

Jul 04, 2023

Hi, 

I'm running the following JavaScript but it doesn't work (variable stays at 0)

Can anyone tell me where I've gone wrong?

let player = GetPlayer();

let num1 = player.GetVar(“Total_Money”);
let num2 = player.GetVar(“COUNT_employees”);

let result = Math.(num1/num2); 

player.SetVar(“Ave”, result);

Many thanks

2 Replies