SA-MP Forums Archive
Can not be calculated maximum usage? - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: Can not be calculated maximum usage? (/showthread.php?tid=414955)



Can not be calculated maximum usage? - sony112502 - 11.02.2013

Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase

Header size: 16248 bytes
Code size: 3602604 bytes
Data size: 2849216 bytes
Stack/heap size: 65536 bytes; estimated max. usage: unknown, due to recursion
Total requirements: 6533604 bytes


"estimated max. usage: unknown, due to recursion",This is an unusual
Can not be calculated maximum usage

How to fix?


Re: Can not be calculated maximum usage? - Vince - 11.02.2013

You have functions that are calling themselves and, witch each call, are allocating more resources. But you shouldn't get this message at all in the first place.


Re: Can not be calculated maximum usage? - leong124 - 11.02.2013

Some algorithms uses recursion to work, for example some sorting methods. If you ensure that you don't use recursive algorithm, you can try to comment out different parts of your script until the compiler doesn't show that message, so that you can find where it causes the problem.
By the way, you can make better use of memory so that you don't need to use "#pragma dynamic".

This thread should be moved to scripting help.