So, how to pass duration and color to Print function in Verse?
What i tried:
using { /Fortnite.com/Devices }
using { /Verse.org/Simulation }
using { /Verse.org/Colors }
using { /Verse.org/Colors/NamedColors }
hello_world_device := class(creative_device)
{
OnBegin():void=
{
MyColor := MakeColorFromSRGB(0.1, 0.2, 0.0)
MyFloat := 31.0
Print(“Text”, Duration := MyFloat, Color := MyColor)
}
}
Got this error: “This function parameter expects a value of type tuple([]char,?Duration:float = …,?Color:color = …), but this argument is an incompatible value of type tuple([]char,type{31.000000},color).(3509)”
Another attempts with no luck(paste only code in OnBegin function):
1.
MyColor := MakeColorFromSRGB(0.1, 0.2, 0.0)
MyFloat := 31.0
Print(“Text”, MyFloat, MyColor)
2.
Print(“Text”, 31.0, NamedColors.Blue)
3.
Print(“Text”, Duration:=31.0, Color:=MakeColorFromSRGB(0.1, 0.2, 0.0))
4.
MyText := “Text”
MyFloat := 31.0
MyColor := MakeColorFromSRGB(0.1, 0.2, 0.0)
MyTuple := (MyText, MyFloat, MyColor)
Print(MyTuple)
5.
MyText := “Text”
MyFloat := 31.0
MyColor := MakeColorFromSRGB(0.1, 0.2, 0.0)
MyTuple := (MyText, Duration := MyFloat, Color := MyColor)
Print(MyTuple)
6.
var MyText:[]char = “Text”
var MyFloat:?float = false
set MyFloat = option{31.0}
var MyColor:?color = false
set MyColor = option{MakeColorFromSRGB(0.1, 0.2, 0.0)}
MyTuple := (MyText, Duration := MyFloat, Color := MyColor)
Print(MyTuple)