register_native natives and ... parameters
Here is a function prototype in Plugin A:
Code:
I would like to call this with a register_native native (that is registered in Plugin A) from Plugin B. I know that I can collect all of the arguments using native style 1 like this: Code:
However, from here I need to make a direct call to "func" with all of these extra parameters, which could be of any variable type. I can't use vformat or anything and then send the condensed result into "func". The only thing that I could come up with was callfunc, except that I can't get the parameter types required for each specific native. Any suggestions? |
Re: register_native natives and ... parameters
I decided that only integers and strings would be fine, so I tried this. It sort of works, except that the "getarg(i-1,1)" check comes back true for integers. I think that it's dipping into other memory, because when I use two separate integers they both result in the same string being formed. Are there any other ways to differentiate between a string and an int that you know of?
Code:
|
Re: register_native natives and ... parameters
Code:
|
Re: register_native natives and ... parameters
Wow, that's really nice. I should be able to find a way to use it in my situation. Thanks.
|
Re: register_native natives and ... parameters
to use it in your situation shoudnt be hard^^
ForceCall( Plugin, "func", "cca", 3,1, your_array ); |
| All times are GMT -4. The time now is 10:44. |
Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.