SA-MP Forums

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

Thread Tools Display Modes
Old 30/09/2011, 06:32 PM   #1
Huge Clucker
Join Date: Oct 2010
Posts: 310
Reputation: 0
Default Compiler

Why Does This Line:
#pragma dynamic 145000
Fix This Problem:
Pawn compiler 3.2.3664	 	 	Copyright (c) 1997-2006, ITB CompuPhase

Header size:           1664 bytes
Code size:            76296 bytes
Data size:            63260 bytes
Stack/heap size:      16384 bytes; estimated max. usage=4132 cells (16528 bytes)
Total requirements:  157604 bytes
And What is this problem?
Sorry for my bad english!
omer5198 is offline   Reply With Quote
Old 30/09/2011, 06:36 PM   #2
Kingunit's Avatar
Join Date: Dec 2010
Location: The Netherlands
Posts: 1,511
Reputation: 120
Default Re: Compiler

Honestly, I don't really know why. But most of the times your strings are too big. Then you are getting that: Header size: etc.

You need to increase them. That's also making your gamemode faster.
Kingunit is offline   Reply With Quote
Old 30/09/2011, 06:39 PM   #3
Join Date: Apr 2009
Posts: 2,387
Reputation: 105
Default Re: Compiler

Your string cells are too big, optimize them a little!
[MWR]Blood is offline   Reply With Quote
Old 30/09/2011, 06:40 PM   #4
Posts: n/a
Default Re: Compiler

As far as I know, the pragma dynamic directive defines how much dynamic memory will get allocated.
I suppose it's in bytes...

But I'm not sure at all.
  Reply With Quote
Old 30/09/2011, 07:07 PM   #5
Babul's Avatar
Join Date: Sep 2009
Location: in a cement block
Posts: 1,911
Reputation: 251
Default Re: Compiler

you maybe got some long, or deep nested routines like
case 0:{}
case 1:{}
case 2:{}
case 30:{}
or the same with if/else if statements.
functions calling other functions a lot, cause the stack growing up - this data to "return to", needs to be stored in a return-table.
you can avoid warnings about a too large heap/stack size by using the -S parameter in the pawn compiler command line. mostly, the compiler options are looking
only. add that -S16384 so the line changes to
-r -S16384
and see if you still get that warning.

new sscanf2 custom specifiers available for Download, read the Release Topic
Babul is offline   Reply With Quote
Old 30/09/2011, 07:16 PM   #6
Berlovan's Avatar
Join Date: Dec 2009
Posts: 989
Reputation: 138
Default Re: Compiler

#pragma dynamic value
Sets the size, in cells, of the memory block for dynamic data
(the stack and the heap) to the value specified by the expression.
The default size of the dynamic data block is implementation
defined. An implementation may also choose to
grow the block on an as-needed basis (see the host program’s
documentation, or the “Implementor’s Guide” for details).
Credits to pawn-lang.pdf
Berlovan is offline   Reply With Quote

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
compiler help yarrum3 Help Archive 3 08/11/2010 06:18 AM
[Pawno Compiler] Unable to Execute the Compiler Fabio11 Client Support 6 26/09/2010 09:37 PM
Compiler ToPhrESH Help Archive 20 12/07/2010 09:53 PM
I need a compiler legend_extric Client Support 1 04/03/2010 07:25 PM
Compiler ScottCFR Help Archive 8 22/12/2009 05:13 AM

All times are GMT. The time now is 09:29 AM.

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