Verse Library verse

08 Fragment

Safely unwraps optional data within a conditional statement to prevent runtime errors when character data might be missing.

verse-library/verse-verbs-functions-and-events/08-fragment.verse

if (FortChar := SomeAgent.GetFortCharacter[]):
    Print("This player has a live character")

Comments

    Sign in to vote, comment, or suggest an edit. Sign in