Getting argument type?
#7

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:
PHP код:
tagof(getarg(0)); // gives error won't compile 
So best option is to make your function something like
PHP код:
//example call to function someFunction("dfd", 3, 45, 55.5, 8)
stock someFunction(args[],  sizeof(args), ...)
{
     for(new 
0si++)
     {
         switch(
getarg(0i))
         {
             case 
'd':{ /* interger */ }
             case 
'f':{ /* float */ }
             
//so on
         
}
     }

Reply


Messages In This Thread
Getting argument type? - by Gammix - 19.01.2016, 01:18
Re: Getting argument type? - by Jefff - 19.01.2016, 01:43
Re: Getting argument type? - by SickAttack - 19.01.2016, 02:19
Re: Getting argument type? - by Gammix - 19.01.2016, 02:21
Re: Getting argument type? - by Vince - 19.01.2016, 10:53
Re: Getting argument type? - by Gammix - 19.01.2016, 13:27
Re: Getting argument type? - by BroZeus - 19.01.2016, 13:48

Forum Jump:


Users browsing this thread: 1 Guest(s)