SA-MP Forums Archive
Pawn compiler - 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: Pawn compiler (/showthread.php?tid=343610)



Pawn compiler - gaby_creed - 18.05.2012

How do I get rid of warnings following the compilation?

pawn Код:
Header size:           8436 bytes
Code size:          1372348 bytes
Data size:          4706332 bytes
Stack/heap size:      16384 bytes; estimated max. usage=4125 cells (16500 bytes)
Total requirements: 6103500 bytes



Re: Pawn compiler - Shadow_ - 18.05.2012

#pragma unused 12000

Just below your includes.


Re: Pawn compiler - gaby_creed - 18.05.2012

But some ways I found that not using this

and it
pawn Код:
#pragma dynamic 140000



Re: Pawn compiler - Vince - 18.05.2012

Optimize your code. #pragma dynamic is a workaround, not a fix. Read:
https://sampforum.blast.hk/showthread.php?tid=55261
https://sampforum.blast.hk/showthread.php?tid=57018


Re: Pawn compiler - MP2 - 18.05.2012

Quote:
Originally Posted by Vince
Посмотреть сообщение
Optimize your code. #pragma dynamic is a workaround, not a fix. Read:
https://sampforum.blast.hk/showthread.php?tid=55261
https://sampforum.blast.hk/showthread.php?tid=57018
I think there is a time that a gamemode gets so big this is unavoidable.


Re: Pawn compiler - MP2 - 18.05.2012

There must be a time when you'll run out of memory - it's not limitless. No matter how efficient you are it's only a matter of time.


Re: Pawn compiler - gaby_creed - 18.05.2012

Quote:
Originally Posted by ******
Посмотреть сообщение
That's not true, it just means you are using too many large locals.
I do not really understand tele codes are complicated. In short you have to make shorter the string?


Re: Pawn compiler - TheArcher - 18.05.2012

Quote:
Originally Posted by gaby_creed
Посмотреть сообщение
I do not really understand tele codes are complicated. In short you have to make shorter the string?
Yes could be. Just to do an example if you want to return a player name the max length is 24 if you create a variable with 256 cells, it's just useless you're just wasing memory.


Re: Pawn compiler - gaby_creed - 18.05.2012

Quote:
Originally Posted by ******
Посмотреть сообщение
There is nothing to suggest that that problem stems from teleports, it is just a result of general code.
I understand.


Re: Pawn compiler - MP2 - 18.05.2012

Quote:
Originally Posted by ******
Посмотреть сообщение
No, memory is not limitless, but we're not talking about ALL memory, we're only talking about stack and heap memory. This is allocated when a function begins and destroyed when a function ends, as long as you know what functions are called and what variables are in functions, you should never run out of memory because it is constantly being freed and there is a static upper bound. The issue here is that the upper bound is higher than the default, but can be very easilly reduced by, as I say, using smaller arrays and fixing recursion (which is not an issue here).
But what about global variables?