SA-MP Forums Archive
No errors!! No Warnings!! but.. - 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: No errors!! No Warnings!! but.. (/showthread.php?tid=518952)



No errors!! No Warnings!! but.. - kesarthakur - 12.06.2014

i compiled my GM after adding some script then i got errors and warning and i solved them
then yes it has compiled perfectly but got something new in compiler



pawn Code:
Pawn compiler 3.2.3664          Copyright (c) 1997-2006, ITB CompuPhase

Header size:           8036 bytes
Code size:           318528 bytes
Data size:           395692 bytes
Stack/heap size:       9600 bytes; estimated max. usage: unknown, due to recursion
Total requirements:  731856 bytes
what is this??
is there any problem with it??


Re: No errors!! No Warnings!! but.. - VishalSama - 12.06.2014

Ur code


Re: No errors!! No Warnings!! but.. - RenovanZ - 12.06.2014

Its okay, just stats of your script.


Re: No errors!! No Warnings!! but.. - xGamerFx - 12.06.2014

nothing happened, its didn't give any effect on your script.


Re: No errors!! No Warnings!! but.. - kesarthakur - 12.06.2014

Quote:
Originally Posted by RenovanZ
View Post
Its okay, just stats of your script.
it didnt showed up until today

it suddenly showed when i made several changes in script


Re: No errors!! No Warnings!! but.. - ]Rafaellos[ - 12.06.2014

It's because you compile with -d3 parameter. As far as you see
pawn Code:
Pawn compiler 3.2.3664          Copyright (c) 1997-2006, ITB CompuPhase
then your script is fine.

EDIT: Or i am wrong, not sure.


Re: No errors!! No Warnings!! but.. - Deji - 12.06.2014

Quote:

Stack/heap size: 9600 bytes; estimated max. usage: unknown, due to recursion

Are you calling a function from the same function? That's known as a "recursive function".

e.g. (C-biased pseudo-code)
Code:
int my_func(int n = 0) {
    return n < 5 ? my_func(n + 1) : n;
}
Calling my_func will ultimately return '5', calling itself 5 times (called 6 times in total).

The call stack would look something like this:
my_func(0) > my_func(1) > my_func(2) > my_func(3) > my_func(4) > my_func(5)

And then unwind (returning '5' in each func to its callee):
(5)my_func > (5)my_func > (5)my_func > (5)my_func > (5)my_func > (5)my_func

The stacks purpose is simply to keep track of calls and saved variables over a long amount of time, ensuring that variables available before calling another function are still available afterwards. This is achieved by data generally being added to the stack with a last-in-first-out method.


It shouldn't be a problem. All Pawno seems to be saying is either that it can't predict whether your recursion will ever end or simply that you indeed use recursion. Recursion can be a problem, if the same function calls itself without any condition which would change before the stack gets full. You just need to make sure that all your recursive functions have a good "out" which will always eventually occur and it should run just fine.


Re: No errors!! No Warnings!! but.. - iFiras - 12.06.2014

Code:
Pawn compiler 3.2.3664          Copyright © 1997-2006, ITB CompuPhase

Header size:           8036 bytes
Code size:           318528 bytes
Data size:           395692 bytes
Stack/heap size:       9600 bytes; estimated max. usage: unknown, due to recursion
Total requirements:  731856 bytes
It's fine, this doesn't affect on your script in a negative or positive way, it just gives you information because you have a large local variable that's not used. Correct if I'm wrong.

Well, like ****** said:

Quote:
Originally Posted by ******
View Post
It probably showed up because you added a recursive function, or added some large local variables that blow the heap.



Re: No errors!! No Warnings!! but.. - Deji - 12.06.2014

Damn my lengthy explanations... the questions get answered about 8 times from when I start writing


Re: No errors!! No Warnings!! but.. - kesarthakur - 12.06.2014

Thanks for the indepth explanation ******