SA-MP Forums

Go Back   SA-MP Forums > SA-MP Scripting and Plugins > Filterscripts > Tools and Files

Reply
 
Thread Tools Display Modes
Old 03/11/2013, 02:58 PM   #1
leong124
High-roller
 
leong124's Avatar
 
Join Date: Jun 2008
Location: Hong Kong, China
Posts: 1,547
Reputation: 134
Default Zeex's PAWN Compiler Patches

Zeex's PAWN Compiler Patches


Introduction
This is a tool that fixes several PAWN compiler bugs and crashes that is made by Zeex. He removed the direct download link and we have to compile the source ourselves. Since many people don't know how to compile the source, or they don't use Linux, I compiled the source on Windows XP SP3 using Visual C++ 2010 and now I'm releasing the files. It should work on all Windows server. I'm not going to compile the Linux version since I don't use it and the files may vary for different Linux OS.

You can visit the page of the project here: https://github.com/Zeex/pawn
He actually provided a tutorial on how to compile the source there. To compile the compiler, you have to set the source path to "source\compiler" directory in CMake, instead of "source" subdirectory. For example, if you put the project files in C:\Pawn, the source directory is C:\Pawn\source\compiler.

Fixes
I think the most important patch of the project is having the line limit increased to 4095, instead of 511. That means you can have 4095 characters per line without causing crashes.

It also fixes triple states crash and multi-dimensional array's initialisation. Stringize and compile time concatenation are supported, but I'm not very sure about what exactly these 3 patches do. If you know, please tell me.

For stringize and compile time concatenation, seems that you can do this (from http://www.compuphase.com/bitboard/i...q_1179971957):
Quote:
Originally Posted by Y_Less
printf("hello " "there");

printf("hello " #there);

#define MAJOR 1
#define MINOR 2
#define BUILD 2342
#define VERSION(%1,%2,%3) "Version: " #%1 "." #%2 "." #%3
printf(VERSION(MAJOR, MINOR, BUILD));

Note: the # token ignores whitespace between it and the first character, otherwise defines like that would print as:

Version: 1. 2. 2342

If that is what you want just add a space in the ".".

This system also ignores unescaped #'s so this:

printf(#hello #there);

would print as:

hello there.
Download
Executables Only
Executables + Full Source(Compiler source + VC++ 2010 Project)

Installation
Simply putting the executables(pawncc.exe and pawnc.dll) into your pawno folder and replace the files.

Credits
  • leong124 - Compiling the files for Windows.
  • Zeex - PAWN Compiler Patches.
__________________
[KDT_MS]hk_shade

Sorry for my bad English and my weakness in expressing myself.
leong124 is offline   Reply With Quote
Old 03/11/2013, 03:00 PM   #2
iZN
High-roller
 
Join Date: Jun 2010
Posts: 2,448
Reputation: 569
Default Re: Zeex's PAWN Compiler Patches

Awesome, will gonna try this for sure!

EDIT: I've tried it, it works great.
__________________
iZN is offline   Reply With Quote
Old 08/11/2013, 09:48 AM   #3
im
Huge Clucker
 
im's Avatar
 
Join Date: Mar 2012
Location: Romānia
Posts: 217
Reputation: 21
Default Re: Zeex's PAWN Compiler Patches

The compiler crashes for me.
http://i.imgur.com/2tzYLXN.png
__________________
im is offline   Reply With Quote
Old 08/11/2013, 10:05 AM   #4
Konstantinos
Spam Machine
 
Konstantinos's Avatar
 
Join Date: Dec 2011
Posts: 11,982
Reputation: 1392
Default Re: Zeex's PAWN Compiler Patches

Quote:
Originally Posted by leong124 View Post
I think the most important patch of the project is having the line limit increased to 4095, instead of 511.
Indeed, I loved it!

Thanks both.
__________________
Life is like riding a bicycle. To keep your balance, you must keep moving.

[Tutorial] How to use SQLite
[FilterScript] Tune System
Konstantinos is offline   Reply With Quote
Old 09/11/2013, 12:48 AM   #5
leong124
High-roller
 
leong124's Avatar
 
Join Date: Jun 2008
Location: Hong Kong, China
Posts: 1,547
Reputation: 134
Default Re: Zeex's PAWN Compiler Patches

Quote:
Originally Posted by im View Post
The compiler crashes for me.
http://i.imgur.com/2tzYLXN.png
Does it crash for any scripts?
__________________
[KDT_MS]hk_shade

Sorry for my bad English and my weakness in expressing myself.
leong124 is offline   Reply With Quote
Old 09/11/2013, 10:33 AM   #6
Gigi-The-Beast
Huge Clucker
 
Join Date: Jan 2010
Posts: 286
Reputation: 25
Default Re: Zeex's PAWN Compiler Patches

Thank you leong, I hoped for this when I sent you that pm!
I will try this for sure, and inform you if there are any problems.
Thank you once again.
Gigi-The-Beast is offline   Reply With Quote
Old 09/11/2013, 02:04 PM   #7
XProtocol
Guest
 
Posts: n/a
Default Re: Zeex's PAWN Compiler Patches

Yet another good work, thank you mate.
  Reply With Quote
Old 10/11/2013, 04:45 AM   #8
coool
Gangsta
 
coool's Avatar
 
Join Date: Feb 2013
Location: Republic of Pakistan
Posts: 587
Reputation: 34
Default Re: Zeex's PAWN Compiler Patches

Does it not show error when showplayerdialog will long ?
__________________
coool is offline   Reply With Quote
Old 14/11/2013, 06:35 PM   #9
Juniiro3
High-roller
 
Join Date: Feb 2013
Location: Campinas, Brasil
Posts: 1,804
Reputation: 140
Default Re: Zeex's PAWN Compiler Patches

Really nice, it solved my compile crashes problem!
Juniiro3 is offline   Reply With Quote
Old 14/11/2013, 06:54 PM   #10
BlueBaron
Huge Clucker
 
BlueBaron's Avatar
 
Join Date: Jul 2011
Location: Skopje, Macedonia
Posts: 312
Reputation: 82
Default Re: Zeex's PAWN Compiler Patches

Amazing. Thanks both of you.
__________________
Also known as Nigel Kage...
BlueBaron 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
PAWN Compiler Error Unable to execute Compiler.. Geeboi_Mehdi General 13 07/11/2015 04:26 PM
Please help ( PAWN Compiler "Error Unable to execute Compiler...") morocco Scripting Help 4 05/02/2013 03:34 PM
Whats up with Zeex? Mauzen Everything and Nothing 5 08/04/2012 08:59 PM
[Help With Pawn] Pawn and compiler is not working..... D_Less Client Support 3 09/03/2012 04:49 AM
What about new pawn compiler in SA-MP 0.3 Maccer Help Archive 11 08/09/2009 04:59 PM


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


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