SA-MP Forums

Go Back   SA-MP Forums > SA-MP Scripting and Plugins > Scripting Help

Reply
 
Thread Tools Display Modes
Old 17/09/2018, 09:30 PM   #1
KinderClans
Banned
 
Join Date: May 2018
Location: Italy
Posts: 718
Reputation: 43
Default Pawn question

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.
KinderClans is offline   Reply With Quote
Old 17/09/2018, 10:01 PM   #2
CrystalMethod
Big Clucker
 
CrystalMethod's Avatar
 
Join Date: Dec 2011
Location: Michigan
Posts: 114
Reputation: 23
Default Re: Pawn question

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

WEBSITE | FORUMS | YOUTUBE | DISCORD
Address: play.thepilotslife.com:7777
Version: 0.3.7-R2

CrystalMethod is offline   Reply With Quote
Old 17/09/2018, 10:22 PM   #3
Grim_
High-roller
 
Grim_'s Avatar
 
Join Date: Sep 2008
Location: United States
Posts: 2,862
Reputation: 118
Default Re: Pawn question

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.
Grim_ is offline   Reply With Quote
Old 17/09/2018, 10:25 PM   #4
ISmokezU
Gangsta
 
Join Date: Aug 2016
Posts: 542
Reputation: 73
Default Re: Pawn question

Code:
Total requirements:21963100 bytes
I get 3.3Mil with a 16k script, You could do a bit more optimization here and there.
ISmokezU is offline   Reply With Quote
Old 17/09/2018, 10:34 PM   #5
Grim_
High-roller
 
Grim_'s Avatar
 
Join Date: Sep 2008
Location: United States
Posts: 2,862
Reputation: 118
Default Re: Pawn question

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 View Post
Code:
Total requirements:21963100 bytes
I get 3.3Mil with a 16k script, You could do a bit more optimization here and there.
Grim_ is offline   Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
[Question] How to do SendFormattedMessage in PAWN? Dystans Scripting Help 9 22/02/2014 05:03 PM
[Question] Using Keywords In Pawn Maxips2 Scripting Help 1 13/09/2012 08:42 PM
A question about pawn Dripac Everything and Nothing 8 16/11/2011 05:13 PM
Little Maths to pawn question... knackworst Scripting Help 3 21/10/2011 09:51 PM


All times are GMT. The time now is 07:18 PM.


Powered by vBulletin® Version 3.8.6
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.