eastern-flames/eastern flames/scripts/array_sum/array_sum.gml

8 lines
136 B
Plaintext
Raw Normal View History

2022-08-07 21:14:04 +00:00
function array_sum(array) {
var i;
var result = 0;
for (i=0; i<array_length(array); i++) {
result += array[i];
}
return result;
}