How to print text with duration and color?

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)

Hey, you forgot to put a questionmark before the Print parameters, this should work:

 OnBegin<override>()<suspends>:void=
        MessageOne : []char = "text"
        ColorRed : color = color{R := 255.0, G := 0.0, B := 0.0}
        MyDuration : float = 3.5
        Print(MessageOne, ?Duration := MyDuration, ?Color := ColorRed)
4 Likes

Thanks, Haze. This works. However, cannot stop noticing that this is a super convoluted way of getting a color. Should be a simple process. First, you need to declare that you’re going to use a colour (different “using” for Named and RGB ?!!!) and then the actual color variable declaration, where you need to input the RGB values separated by the color identifier and commas. Like wtf, as a new starter with Verse, I find it discouraging, honestly.
Sorry for the rant, lol. Had to blow some steam. :joy: