How to have chaging amount of variables in function call?
Posted: Sun Aug 01, 2010 5:57 pm
Since some of Hollywoods own functions work this way, there must be a way for user to do the same.
So thing is, I would want to make a function, that could in different places of code receive different amount of variables to it.
As example.
first it would use:
then later in the code there could be same function call but with more arguments in way of:
Therefore how can i then do it so that:
So thing is, I would want to make a function, that could in different places of code receive different amount of variables to it.
As example.
first it would use:
Code: Select all
P_talkbox(x, y, $message)Code: Select all
P_talkbox(x, y, $message, $color, $colorofbox, amountoftransparency)Therefore how can i then do it so that:
Code: Select all
Function p_talkbox(x , y, $message, $color, $colorofbox, amountoftransparency)
IF there is $color
$color=$color
ELSE
$color=777777
ENDIF
IF there is amontoftransparency
amountoftrasnparency=amountoftransparency
ELSE
amoungoftrasnparency=255
ENDIF
P_Drawtalkbox(x, y, $message, $color, $colorofbox, amountoftransparency)
ENDFUNCTION