When you make a spel code and has a BIG loop, maybe you will have this error:
6147 Spell interp failed at <file_name>.spl:<line>:<spel_name>::<func_name>: ilimit exceeded
But you have to use that BIG loop, you can grow the ilimit just in that code, using for example:
set_ilimit(1000000);
1000000 is the value of iterations in that loop.