31.01.2020, 07:12
Quote:
Heap/stack size max. usage estimations are based, mostly, on how much depth of function calls your script might fall into. Provided there is no recursion, in which case it'd theoretically be infinite. This happens because each depth requires arguments and returns addresses amongst other data to be added to the stack.
In any case, for SA-MP at least, the correct solution is always to just increase the size of the heap. Do this by adding this preprocessor directive to your script: #pragma dynamic 16000 This will set your script's heap to 16000 cells, or around 64k bytes. There are no downsides to having too much heap other than meaningless amounts of extra memory usage. If this still worries you for whatever reason you could do 8000 (for 32k bytes) |