Navigation

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

    String operations

    Help
    3
    4
    172
    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.
    • Electric Dreams
      Electric Dreams F last edited by

      is there a simple way to truncate a string ?
      like strleft() or strright()

      I would like to format the player score on 5 caracters.
      for example, if the player score is 250 points, I want to display "00250"
      I concatenate "00000"+"250" and I keep the 5 caraters from then right : 00000250

      but it seems ther is not yet any functions to do that...

      Any ideas ?

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

        truncScore = score[-5:]
        Should return the last 5 digits of string “score”

        1 Reply Last reply Reply Quote 1
        • Electric Dreams
          Electric Dreams F last edited by

          That's perfect @Jongjungbu
          Thank you
          the use of this feature deserves to be documented.

          1 Reply Last reply Reply Quote 2
          • Dave
            Dave Fuze Team last edited by

            I'll be working on adding this documentation to a future patch - it won't be in the one coming up, but the online help can and will be updated earlier.

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