diff --git a/config/scripts.cfg b/config/scripts.cfg index 00a73b1c..3974223f 100644 --- a/config/scripts.cfg +++ b/config/scripts.cfg @@ -258,7 +258,7 @@ add2list = [ if (strcmp "" (getalias $arg1)) [ $arg1 = $arg2 ] [ $arg1 = (concat rrnd = [ + (rnd (- $arg2 $arg1)) $arg1 ] // listaverage - Returns the average of a list of numbers. (Supports ints & floats - e.g. echo (listaverage "2 5 5") // Output: 4.0) -listaverage = [ if (&& (listlen $arg1) (testlist $arg1)) [ tmp_sum = 0; loop gsl (listlen $arg1) [ += tmp_sum (at $arg1 $gsl) ]; result (divf $tmp_sum (listlen $arg1)) ] ] +listaverage = [ if (&& (listlen $arg1) (testlist $arg1)) [ tmp_sum = 0; loop gsl (listlen $arg1) [ +=f tmp_sum (at $arg1 $gsl) ]; result (divf $tmp_sum (listlen $arg1)) ] ] // copyent & pasteent - Quickly copy/paste the current closest entity. Initialize the two aliases below as "NULL" for error catching. // If /config/saved.cfg is readable/writable, errors are only possible up until the very first use of /copyent.