Hello I'm trying to figure out the correct syntax for getting the sum from a class list using LINQ in unityscript
var totalCount: int;
class munsters {
var beast: String;
var min: int = 1;
var max: int =1;
}
var wilds: List.<munsters>;
//this gives me the error --
//InvalidProgramException: Invalid IL code in OppSpawnTester:OnDrawGizmos (): IL_0007: ldarg.1
totalCount = wilds.Sum(function(a) a.max);