31.07.2016, 17:11
I want to call a local function indirectly with arguments without inside of a argument function.
What i mean is, i will store the arguments into a variable with a MAX value.
After certain time interval, i will call "CallLocalFunction" with all the stored arguments pushed in.
But i am not that good with amx assembly, so i guess if you can help?
// Code explanation
I was successful in performing the code for only integer type arguments but i can't figure out for Float and String.
What i mean is, i will store the arguments into a variable with a MAX value.
After certain time interval, i will call "CallLocalFunction" with all the stored arguments pushed in.
But i am not that good with amx assembly, so i guess if you can help?
// Code explanation
pawn Код:
#define MAX_ARGS (10)
new array[MAX_ARGS][100];
new fmat[MAX_ARGS];
function(format[], {Float, _}:...)
{
fmat = format;
array = args; // store all the arguments in this array
}
timer()
{
CallLocalFunction("oncall", fmat, array);
}
public OnCall(id, string...)
{
}
I was successful in performing the code for only integer type arguments but i can't figure out for Float and String.