Navigation

    Fuze Arena Logo
    • Register
    • Login
    • Search
    • Categories
    • Recent
    • Popular
    • Users
    • Groups
    • Help
    • Discord

    Input restrictions

    Help
    5
    6
    268
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • LinkCraft
      LinkCraft F last edited by

      Is there a way to restrict how many characters someone can type for input

      1 Reply Last reply Reply Quote 1
      • Zypher
        Zypher last edited by

        If you are able to monitor the amount of letters typed, then have a variable that stores the number of presses and when it gets to its limit stop the code for it. I honestly havent tested any of that but it's an idea :v

        1 Reply Last reply Reply Quote 0
        • Spacemario
          Spacemario F last edited by

          What I did for this was just check the length of the string variable their input went in to, then called my input function again if it was too many.

          function getInput()
              theirText = input("Don't type more than ten characters:")
              if len(theirText) > 10 then
                  getInput()
              endif
          return void
          
          1 Reply Last reply Reply Quote 0
          • LinkCraft
            LinkCraft F last edited by

            Ok thanks @Spacemario

            1 Reply Last reply Reply Quote 0
            • P
              petermeisenstein F last edited by

              Is input like scanner in java ?

              1 Reply Last reply Reply Quote 0
              • Martin
                Martin Fuze Team last edited by

                https://fuzearena.com/help/view/input

                1 Reply Last reply Reply Quote 0
                • First post
                  Last post