EditorGUILayout.minmaxslider error HELP PLEASE

Ok I’m trying to use editorguy’s min max slider and its not working it keep s saying best overload error or something like that and also says missing ref moddifier. no mater what i try i always get this error. heres what i have :

EditorGUILayout.MinMaxSlider(ItmController.randomMinVal, ItmController.randomMaxVal, ItmController.randomMinLimit, ItmController.randomMaxLimit);

and yes all my references are in place i’ve even tried it without them still get the error. what am i doing wrong?

The first two parameters are reference parameter, so you have to use the ref keyword:

EditorGUILayout.MinMaxSlider(ref ItmController.randomMinVal, ref ItmController.randomMaxVal, ItmController.randomMinLimit, ItmController.randomMaxLimit);

At least in C# you have to. Like the RaycastHit out parameter in Physics.Raycast. There you have to use the out keyword.