So I was just writing some delay functions like this:
(Function:tuple()->void).After(Time:float)<suspends>:void=
Sleep(Time)
Function()
(Function:t->void).After(Time:float,ExtraData:t where t:type)<suspends>:void=
Sleep(Time)
Function(ExtraData)
(Function:tuple(t,t)->void).After(Time:float,ExtraData1:t,ExtraData2:t where t:type)<suspends>:void=
Sleep(Time)
Function(ExtraData1,ExtraData2)
when I tried to pass suspends function as an input
(Function:tuple(t,t)<suspends>->void).Delay(Time:float,ExtraData1:t,ExtraData2:t where t:type)<suspends>:void=
Sleep(Time)
Function(ExtraData1,ExtraData2)
It didn’t work, I got: “Attributes are not allowed on invocation expressions.”
Thanks, I also tried with some api functions, but I got error when using parametric types.
(Function:type{_(:t)<transacts>:void}).After3(Time: float, Args: t where t:type)<suspends>:void=
Sleep(Time)
Function(Args)
spawn{WinnerFortCharacter.SetVulnerability.After3(7.6,true)}
Script error 3502: Using a value of type type{_(:type{_(:t)<transacts>:void},:tuple(float,t) where t)<suspends>:void}
as a value of type type{_(:type{_(:logic)<transacts>:void},:tuple(float,logic))<suspends>:void} is not yet implemented.
I guess we can’t do much about it if it’s not implemented, this worked fine: