I’m trying to use a function to count the number of errors I got in my scripts. I created many modules for my projects and I run them all using a module with all those projects in the helper. Also I made a module with many functions. So… for this function, I would like to put it in there to use it in other modules.
This is what I want the function to do
Takes two params (string and number)
string will be error message
number will be -1 or 0 or 1
if number is -1
display total number of errors
display all the error messages in the list
if number is 0
if number is 1
add 1 to number of errors
add error message to a list
end of function
It will really help even if I can get some hint of how to do this.
The number kept on resetting to 0 and didn’t add up properly when I tried to do it myself :?.