Raised This Month: $ Target: $400
 0% 

#pragma reqclass, reqlib, loadlib


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
jimaway
Heeeere's Jimmy!
Join Date: Jan 2009
Location: Estonia
Old 09-18-2012 , 07:10   Re: #pragma reqclass, reqlib, loadlib
Reply With Quote #2

Quote:
The next important preprocessor macro is pragma. This directive is used mainly for things that the AMXX core (or any other core running a Pawn plugin) must know before the plugin is loaded.

The pragma directive can be used for many things in AMXX - for instance, increasing the amount of memory (16kb by default) allocated to each plugin. If you want 128kb, for example, you can run this macro somewhere in your plugin:

Code:
#pragma dynamic 32768

This is not particularly useful for most plugins, but is generally needed for plugins that use a lot of memory, such as WC3, Superhero Mod, or any mod of that calibre.

pragma is also used for many other operations, such as semicolon (forces the compiler to use semicolons to close lines, use #pragma semicolon 1), libraries/classes (#pragma library "library", #pragma reqlib "mylib", #pragma reqclass "myclass", etc. - for a demonstration of these, look at the top of the module header files).
https://forums.alliedmods.net/showthread.php?t=46798

next time use the search before posting
jimaway is offline
 



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

Forum Jump


All times are GMT -4. The time now is 08:14.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode