How to pass undefined number of argument to another function -
xX_Simon_Xx - 04.02.2013
PHP Code:
//somewere func(10,"hello",0.14)
stock func({Float, _}:...)
{
//do someting
func2(); // HOW i can pass {Float, _}:... to this function???
}
stock func2({Float, _}:...)
{
//do something else;
}
Re: How to pass undefined number of argument to another function -
LarzI - 04.02.2013
https://sampforum.blast.hk/showthread.php?tid=399069
Re: How to pass undefined number of argument to another function -
xX_Simon_Xx - 04.02.2013
Whitout YSI

i need to use emit right

?
PHP Code:
stock mysql_function_queryEx(connectionHandle, query[], bool:cache, callback[], format[], {Float,_}:...)
{
//something
return mysql_function_query(connectionHandle, query, cache, callback, format, //var);
}
or i can use the #define version whitout emit

??
Quote:
or i can use the #define version whitout emit ??
|
PHP Code:
#define mysql_function_queryEx(%0,%1,%2,%3,%5,%6) \
//sometig \
return mysql_function_query(%0,%1,%2,%3,%5,%6);
Re: How to pass undefined number of argument to another function -
InfiniTy. - 04.02.2013
https://sampforum.blast.hk/showthread.php?tid=77000
Re: How to pass undefined number of argument to another function -
xX_Simon_Xx - 04.02.2013
Quote:
Originally Posted by Adytza.
|
This has nothing to do with my question
I want to know how to do without using the #define
Re: How to pass undefined number of argument to another function -
iggy1 - 04.02.2013
https://sampforum.blast.hk/showthread.php?tid=77000
Use the functions getarg and numargs. No define.
Re: How to pass undefined number of argument to another function -
xX_Simon_Xx - 04.02.2013
Quote:
Originally Posted by iggy1
|
numargs return a simply integer number that rappresent the number of the argument
getarg return only one argument
It's unuseful for pass all argument
I need to pass an undefined number argument to another function not to read it
The easyest way is whit #define but i want to know how can do it whit #emit or if is another simple way
Re: How to pass undefined number of argument to another function - T0pAz - 04.02.2013
Quote:
Originally Posted by xX_Simon_Xx
numargs return a simply integer number that rappresent the number of the argument
getarg return only one argument
It's unuseful for pass all argument
I need to pass an undefined number argument to another function not to read it
The easyest way is whit #define but i want to know how can do it whit #emit or if is another simple way
|
Use y_va then.
Re: How to pass undefined number of argument to another function -
xX_Simon_Xx - 05.02.2013
Quote:
Originally Posted by Y_Less
Why?
|
simply to understand how it's done
Re: How to pass undefined number of argument to another function -
xX_Simon_Xx - 05.02.2013
can you link me the post?