[VERSE]How to Modify Player health with If and Functions

I’m just experimenting with the features of GetHealth and I don’t know if this is the right way to get a player’s life or if it’s possible, but, the documentation about this doesn’t help me to know how to declare it correctly, how could I fix it?

using { /Fortnite.com/Devices }
using { /Fortnite.com/Characters }
using { /Fortnite.com/Playspaces }
using { /Verse.org/Simulation }
using { /Verse.org/Verse }

        
hello_world_device := class(creative_device):

    @editable
    boton:button_device=button_device{}

    # Runs when the device is started in a running game
    OnBegin<override>()<suspends>:void=
        boton.InteractedWithEvent.Subscribe(dano)
        

    dano(Agent:agent) : void =
                #heal 
        Health:=0.0
        AllPlayers: []player = Self.GetPlayspace().GetPlayers()
            if (FirstPlayer : player = AllPlayers[0]):
                if (FortniteCharacter : fort_character = FirstPlayer.GetFortCharacter[]):
                    FortniteCharacter.GetHealth(health)
                    if( health=100):
                        Print("Max Health")
                    else:
                        FortniteCharacter.Heal(100.0)

Blockquote [{
“message”: “Unknown identifier health.”
}]

Answer: I think i fix it , hope this work for someone:

using { /Fortnite.com/Devices }
using { /Fortnite.com/Characters }
using { /Fortnite.com/Playspaces }
using { /Verse.org/Simulation }
using { /Verse.org/Verse }

        
hello_world_device := class(creative_device):

    @editable
    boton:button_device=button_device{}

    # Runs when the device is started in a running game
    OnBegin<override>()<suspends>:void=
        boton.InteractedWithEvent.Subscribe(dano)
        

    dano(Agent:agent) : void =
                #heal 
        Health:=100.0
        AllPlayers: []player = Self.GetPlayspace().GetPlayers()
            if (FirstPlayer : player = AllPlayers[0]):
                if (FortniteCharacter : fort_character = FirstPlayer.GetFortCharacter[]):
                    health:=FortniteCharacter.GetHealth()
                    maxhealth:=FortniteCharacter.GetMaxHealth()
                    if( health=maxhealth):
                        Print("Max Health")
                        boton.Disable()
                    else:
                        FortniteCharacter.Heal(100.0)
1 Like