SA-MP Forums

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

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

Why Does This Line:
pawn Code:
#pragma dynamic 145000
Fix This Problem:
pawn Code:
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
High-roller
 
Kingunit's Avatar
 
Join Date: Dec 2010
Location: The Netherlands
Posts: 1,495
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
[MWR]Blood
High-roller
 
Join Date: Apr 2009
Posts: 2,406
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
Double-O-Seven
Guest
 
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
High-roller
 
Babul's Avatar
 
Join Date: Sep 2009
Location: in a cement block
Posts: 1,925
Reputation: 249
Default Re: Compiler

you maybe got some long, or deep nested routines like
Code:
switch(condition)
{
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
Code:
-r
only. add that -S16384 so the line changes to
Code:
-r -S16384
and see if you still get that warning.
__________________
FireWorks

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
Gangsta
 
Berlovan's Avatar
 
Join Date: Dec 2009
Posts: 993
Reputation: 129
Default Re: Compiler

Code:
#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
__________________

hi
Berlovan 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
compiler help yarrum3 Help Archive 3 08/11/2010 07: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 08:25 PM
Compiler ScottCFR Help Archive 8 22/12/2009 06:13 AM


All times are GMT. The time now is 12:02 AM.


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