SA-MP Forums

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

Reply
 
Thread Tools Display Modes
Old 27/01/2020, 08:03 PM   #1
rockys
Big Clucker
 
Join Date: Oct 2018
Location: pawn
Posts: 67
Reputation: 0
Default what is #pragma compress 0

what is #pragma compress 0?
with what help me?
rockys is offline   Reply With Quote
Old 28/01/2020, 01:47 AM   #2
Markski
Big Clucker
 
Markski's Avatar
 
Join Date: Apr 2015
Location: La Plata, Argentina
Posts: 133
Reputation: 59
Default Re: what is #pragma compress 0

The "#pragma compress" directive toggles wether or not the compiler's generated bytecode will be in either compact or plain encoding. If the value is anything but zero, compact encoding is used, otherwise, plain encoding is used. Sometimes certain scripts may not compile if compact encoding is enabled, so if you saw this in a previously written script, that's likely the reason why that's there.

Read more under "Directives" in the Pawn Language Document
Markski is offline   Reply With Quote
Old 28/01/2020, 06:03 AM   #3
rockys
Big Clucker
 
Join Date: Oct 2018
Location: pawn
Posts: 67
Reputation: 0
Default Re: what is #pragma compress 0

So is recommanded to be 0?
rockys is offline   Reply With Quote
Old 28/01/2020, 02:19 PM   #4
Sasinosoft
Little Clucker
 
Sasinosoft's Avatar
 
Join Date: Jan 2020
Location: Tampa, FL
Posts: 26
Reputation: 1
Default Re: what is #pragma compress 0

Why would you want to change it, in the first place?
Sasinosoft is offline   Reply With Quote
Old 28/01/2020, 09:59 PM   #5
Markski
Big Clucker
 
Markski's Avatar
 
Join Date: Apr 2015
Location: La Plata, Argentina
Posts: 133
Reputation: 59
Default Re: what is #pragma compress 0

Quote:
Originally Posted by rockys View Post
So is recommanded to be 0?
Certain scripts might not compile properly with compact encoding enabled. I reckon perhaps scripts which handle strings in one way or another, but not sure.

If your script compiles correctly, don't touch this directive.
Markski 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
symbol lookup error: plugins/mysql.so: undefined symbol: compress Grzechuso Scripting Help 2 06/01/2016 03:52 PM
Pragma ZcvDev Scripting Help 0 30/01/2015 12:37 PM
End #pragma? Tagathron Scripting Help 1 09/03/2014 04:33 PM


All times are GMT. The time now is 06:05 PM.


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