How to pass undefined number of argument to another function
#1

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;

Reply
#2

https://sampforum.blast.hk/showthread.php?tid=399069
Reply
#3

Whitout YSI
i need to use emit right?
PHP Code:
stock mysql_function_queryEx(connectionHandlequery[], bool:cachecallback[], format[], {Float,_}:...)
{
      
//something
      
return mysql_function_query(connectionHandlequerycachecallbackformat//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); 
Reply
#4

https://sampforum.blast.hk/showthread.php?tid=77000
Reply
#5

Quote:
Originally Posted by Adytza.
View Post
This has nothing to do with my question

I want to know how to do without using the #define
Reply
#6

https://sampforum.blast.hk/showthread.php?tid=77000

Use the functions getarg and numargs. No define.
Reply
#7

Quote:
Originally Posted by iggy1
View Post
https://sampforum.blast.hk/showthread.php?tid=77000

Use the functions getarg and numargs. No define.
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
Reply
#8

Quote:
Originally Posted by xX_Simon_Xx
View Post
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.
Reply
#9

Quote:
Originally Posted by Y_Less
View Post
Why?
simply to understand how it's done
Reply
#10

can you link me the post?
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)