[26 Feb 2011] dont understand args
Posted: Sat Jun 13, 2020 5:32 pm
Note: This is an archived post that was originally sent to the Hollywood mailing list on Sat, 26 Feb 2011 21:37:52 -0000
can anyone tell me why this code shows number of parameters passed to function as 0 ?
why is Hollywood so annoying ? and not just return 2 ?
what i am trying to get done is create a function that can use variable number of inputs and do different things.
eg
if function use 2 params do this code []
if function use 3 params do this code instead []
any help appreciated.
can anyone tell me why this code shows number of parameters passed to function as 0 ?
why is Hollywood so annoying ? and not just return 2 ?
Code: Select all
Function p_test(param1,param2,...)
Print("param1=",param1, "param2=",param2,"number of parameters to function=", arg.n)
EndFunction
p_test(1,2)
WaitLeftMouse
eg
if function use 2 params do this code []
if function use 3 params do this code instead []
any help appreciated.