Search code examples
simulationanylogic

Sudden too many errors: methods are undefined


My DES model was working well till I've added a new function (just like many others added before) and the model gave me all these error messages:

enter image description here

I wonder what do these messages mean and what made all of them appear suddenly. I was running the model just before it without any errors. Is there a way I could get my model back? :)

Thank you.

Edit 1: Here is the newly created function: Newly created function

Given that I've ignored it, and made all the callings of it as comments, then the errors were still appearing. I've closed this model version and opened a backup then created the same function and the whole scenario happened again with the same 94 errors.

Is there something I need to change in the function itself? The function checks the number of agents in certain parts of the model to stop delay blocks accordingly. That's done by adding variables that increment on exiting of agents and get the difference between them.


Solution

  • Typically this is caused by a syntax error in the new function that you created. See if you ignore this and then compile if it gets fixed.

    Most of the time the compiler is smart enough to show you the error, but often if you replace a { with [ or you leave out a { the compiler get very confused and gives you 100s of errors.

    If yous still cant find the issue maybe paste the code of your new function in the question.