Naming the player is not working the way I thought it would [solved]

I got this Code from someone else. It shoild just ignore the command, but instead it gets passive aggressive and asks for your name again. I'm not sure what else to do.
jj
gname function code:

msg ("What's your name?")
get input {
  is_command = false
  foreach (cmd, ScopeCommands()) {
    if (IsRegexMatch (cmd.pattern, result)) {
      is_command = true
    }
  }
  if (is_command) {
    msg ("Is that so? Okay, you're Good then.")
    // gname
    gname
  }
  else {
    player.alias = result
    msg ("What's your name?")
    get input {
      is_command = false
      foreach (cmd, ScopeCommands()) {
        if (IsRegexMatch (cmd.pattern, result)) {
          is_command = true
        }
      }
      if (is_command) {
        msg ("Is that so? Okay, you're Good then.")
        // gname
        gname
      }
      else {
        player.alias = result
        msg ("What's your gender?")
        get input {
          is_command = false
          foreach (cmd, ScopeCommands()) {
            if (IsRegexMatch (cmd.pattern, result)) {
              is_command = true
            }
          }
          if (is_command) {
            msg ("Is that so? Okay, you're Good then.")
            // gname
            gname
          }
          else {
            player.gender = result
            msg ("Just to be safe, what pronouns do you want?")
            pronouns = Split("Boy;Girl;Neutral;Surprise Me", ";")
            ShowMenu ("Pronouns", pronouns, true) {
              switch (result) {
                case ("Boy") {
                }
                case ("Girl") {
                }
                case ("Neutral") {
                }
                case ("Surprise Me") {
                }
              }
            }
            msg ("Press any key or type \"mobile user\" or \"phone user\" to continue.")
            wait {
              MoveObject (player, room)
            }
          }
        }
      }
    }
  }
}

Starting room room description code

msg ("Hiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiii!!!<br/>....<br/>Righto.<br/><br/>Now, the Pokémon... They are... magical creatures. Sometimes they are animals, and sometimes they are objects (such as Pokéballs) that come to life.<br/><br/>Commands you should know; Heal Oran Berry me, Heal Sitrus Berry me, Rest me, Access object, Egress object, Look at object, x object, Check object, Scan object<br/><br/>Equip Pokemon.<br/>Save often. I recommend saving every 30 minutes.")
gname
msg ("{command:help:Help}<br/>{command:Skip And Use Default Settings:Skip and use default settings}")

What's supposed to happen: Skip and use default settings.
What's happening: passive aggressively asking for your name.

What should I do?


Nevermind, I got it:

msg ("What's your name?")
get input {
  is_command = false
  foreach (cmd, ScopeCommands()) {
    if (IsRegexMatch (cmd.pattern, result)) {
      is_command = true
    }
  }
  if (is_command) {
    msg ("Is that so? Okay, then.")
    player.alias = "Gold"
    MoveObject (player, room)
  }
  else {
    player.alias = result
    msg ("What is your gender?")
    get input {
      is_command = false
      foreach (cmd, ScopeCommands()) {
        if (IsRegexMatch (cmd.pattern, result)) {
          is_command = true
        }
      }
      if (is_command) {
        msg ("Is that so? Okay, you're Good then.")
        MoveObject (player, room)
      }
      else {
        player.gender1 = result
        msg ("Just to be safe, what pronouns do you want?")
        pronouns = Split("Boy;Girl;Neutral;Surprise Me", ";")
        ShowMenu ("Pronouns", pronouns, true) {
          switch (result) {
            case ("Boy") {
              player.gender = "he"
              player.article = "him"
              player.possesive = "his"
            }
            case ("Girl") {
              player.gender = "she"
              player.article = "her"
              player.possesive = "her"
            }
            case ("Neutral") {
              player.gender = "they"
              player.article = "them"
              player.possesive = "their"
            }
            case ("Surprise Me") {
              roll = GetRandomInt(1,3)
              if (roll = 1) {
                player.gender = "he"
                player.article = "him"
                player.possesive = "his"
              }
              if (roll = 2) {
                player.gender = "she"
                player.article = "her"
                player.possesive = "her"
              }
              if (roll = 3) {
                player.gender = "they"
                player.article = "them"
                player.possesive = "their"
              }
            }
          }
        }
        msg ("Press any key or type \"mobile user\" or \"phone user\" to continue.")
        wait {
          MoveObject (player, room)
        }
      }
    }
  }
}

This topic is now closed. Topics are closed after 60 days of inactivity.

Support

Forums