19.01.2016, 13:48
There is really no way to detect it you need to pass the format of argument like in functions like mysql_tquery, where you pass the format of variable to be passed to callback as a string.
tagof doesn't works with getarg directly it gives error.
For example:
So best option is to make your function something like
tagof doesn't works with getarg directly it gives error.
For example:
PHP код:
tagof(getarg(0)); // gives error won't compile
PHP код:
//example call to function someFunction("dfd", 3, 45, 55.5, 8)
stock someFunction(args[], s = sizeof(args), ...)
{
for(new i = 0; i < s; i++)
{
switch(getarg(0, i))
{
case 'd':{ /* interger */ }
case 'f':{ /* float */ }
//so on
}
}
}