Deprecated: Creation of dynamic property Wiki::$m_request_prefix is deprecated in /home/sa-mp/sa-mp/sa-mp.nl/Sources/Modules/Development/Wiki.php on line 18

Over the years Las Venturas Playground has grown to be a massive gamemode. Over 4 megabytes of code spread over 110,000 lines in 325 files are responsible for the current version, which keeps growing rapidly with every release. Many code is outdated, any form of structure is hard to be found and even finding basic functionality can be a hassle.

In order to solve that issue, development of the LVP PreCompiler started in 2006. In enhances the syntax of Pawn and introduces features such as classes, constructors, annotations, automated documentation and infrastructure for a testing framework. It was never completed, until Russell took on the work again in 2011 and finished a stable version.

What the PreCompiler does is fairly simple. As the name makes you suspect, it introduces a preliminary compilation phase which happens before the actual Pawn compilation. The new syntax will be translated to traditional Pawn code, lists will be maintained and fair amounts of code will be generated.

The primary new syntax the PreCompiler adds is the ability to write code in classes.

Having over a hundred lines of source code has the potential to make debugging bugs and errors incredibly hard. In order to test basic functionality of your script at every start-up, the PreCompiler implements infrastructure for a testing framework which allows you to write test-suites for the most critical parts of your script.

Besides the earlier noted major enhancements, a number of smaller modifications have been made to the Pawn language and compiler as well. While many of these are mostly for convenience, they have proved to come in useful and are generously being used by Las Venturas Playground.

By default, Pawn imposes a limit of 32 characters on the names of methods. As Las Venturas Playground's styleguide says to be as descriptive as possible in class, variable and method names, this is not a lot. Therefore the limit has been increased to 64 characters for non-exported functions, thus without breaking binary compatibility of AMX files.