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



Pawn question - KinderClans - 17.09.2018

I'm scripting a gamemode from scratch. Currently it counts 10080 lines, i added more debug info when i compile and i get this:

Quote:

Header size: 13052 bytes
Code size: 1280620 bytes
Data size: 3630068 bytes
Stack/heap size: 17039360 bytes; estimated max. usage=3694 cells (14776 bytes)
Total requirements:21963100 bytes

My question is:

Are those sizes good for a 10k+ lines script or i should optimize it better?

Amx size is 1.678 KB.


Re: Pawn question - CrystalMethod - 17.09.2018

10k seems pretty appropriate. If I remember correctly, the server I used to frequent til it shut down was 33k. (not including maps)


Re: Pawn question - Grim_ - 17.09.2018

We can't give you an appropriate answer just off the number of lines in your script. What features does your gamemode have? Do any of them require heavy memory? How many whitespaces are in your script? Comments?

Follow good programming practices and you won't have an issue. But this is an answer no one can give you without talking out of their ass.


Re: Pawn question - ISmokezU - 17.09.2018

Код:
Total requirements:21963100 bytes
I get 3.3Mil with a 16k script, You could do a bit more optimization here and there.


Re: Pawn question - Grim_ - 17.09.2018

Quote:
Originally Posted by Grim_
But this is an answer no one can give you without talking out of their ass.
Here's an example!
Quote:
Originally Posted by ISmokezU
Посмотреть сообщение
Код:
Total requirements:21963100 bytes
I get 3.3Mil with a 16k script, You could do a bit more optimization here and there.