Raised This Month: $23 Target: $400
 5% 

Executing natives defined in the plugin from the module?


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
milutinke
AlliedModders Donor
Join Date: Jun 2012
Location: Serbia
Old 01-30-2020 , 14:47   Executing natives defined in the plugin from the module?
Reply With Quote #1

Hello, I have not done much stuff with the modules, I mostly made everything I needed with the plugins, but I have hit a barrier with the AMXX Pawn scripting language.
I have a plugin that gives the players abilities with API made using natives.
I am using that API inside the small function execution engine I made as a separate plugin, but the problem is that I do not have the ability to dynamically allocate the memory and the memory space is limited, and I have some weird problems with explode function which splits the string when I am using more than 12 cells for each part of the string, it gives me an index out of bounds.
(Context: I am using that function execution engine which I made to execute the functions defined in the INI file for classes in my mod, so the people who are using the mode can easily change each class abilities without needing to learn the AMXX scripting language itself and asking me to help them every 1-2 days. I wrote an HTML documentation for it and they are picking it up very quickly, so I am quite pleased, but the problem is that I want to add some additional features like variables, which I can not to with the AMXX without going through the hell of implementing it).

I am looking forward to port the execution engine to the module and add some features, but I want to know if it is possible to execute existing AMXX natives defined in the plugin since it would be a lot of work to port the existing functionality from the abilities plugin which is tried and tested.
I have tried googling it, but I have not found anything.

Thanks.

PS:
The explode function I am using is:
PHP Code:

// Originally by xeroblood
stock ExplodeString( const szInput[ ], const iCharacterszOutput[ ][ ], const iMaxs, const iMaxLen ) {
    new 
iDo 0iLen strlenszInput ), iOutputLen 0;
    
    do { 
iOutputLen += ( copycszOutputiDo++ ], iMaxLenszInputiOutputLen ],  iCharacter ) ); }
    while( 
iOutputLen iLen && iDo iMaxs )

Code which is making the index out of bounds for more than 12 cells:
PHP Code:
new szParametersList12 ][ 12 ];
new 
iParametersNumber 0;
new 
iIterator 0;
    
ExplodeStringszParameters','szParametersList12charsmaxszParametersList ) ); 
This is now the "language" looks like (last column):


Update:
Found this https://github.com/alliedmodders/amx...ules.cpp#L1796
It is available in the SDK: https://github.com/alliedmodders/amx...module.h#L2440
But I can not find the function which executed the found native.
Can the MF_AmxExec execute the found native?
__________________

Last edited by milutinke; 01-30-2020 at 15:13.
milutinke is offline
Send a message via Skype™ to milutinke
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

Forum Jump


All times are GMT -4. The time now is 16:22.


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