Function with optional parameters only crashes Verse

Please select what you are reporting on:

Verse

What Type of Bug are you experiencing?

Verse

Summary

The following function crashes Verse for some reason

Steps to Reproduce

(Color: color).AdjustHSV(?HueOffset:float = 0.0, ?SaturationOffset: float = 0.0, ?ValueOffset: float = 0.0):color=
    HSV := MakeHSVFromColor(Color)
    return MakeColorFromHSV(HSV(0) + HueOffset, HSV(1) + SaturationOffset, HSV(2) + ValueOffset)

Expected Result

Being able to call the function with any optional parameter we want, or use the default values if none provided

Observed Result

Verse crashes

Platform(s)

PC

Additional Notes

Doing this works but it’s ugly

(Color: color).AdjustHSV(:logic, ?HueOffset:float = 0.0, ?SaturationOffset: float = 0.0, ?ValueOffset: float = 0.0):color=
    HSV := MakeHSVFromColor(Color)
    return MakeColorFromHSV(HSV(0) + HueOffset, HSV(1) + SaturationOffset, HSV(2) + ValueOffset)

Also have the same problem with this function :

(ConditionalButton : conditional_button_device).CustomConsume(Agent:agent, Amount:int, ?ItemIndex:int = 0):void=return

Which is different from the color one but still bugs instantly when adding the ?

1 Like