Navigation

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

    Why is this not working in Fuze

    Coding
    3
    4
    285
    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.
    • P
      petermeisenstein F last edited by

      Hey why i cant say test=[""]

      spt games 1 Reply Last reply Reply Quote 0
      • PickleCatStars
        PickleCatStars F last edited by

        ? What are you trying to do, man?

        1 Reply Last reply Reply Quote 1
        • spt games
          spt games @petermeisenstein last edited by spt games

          @petermeisenstein What seems to be the problem? Have just written the program below and it works fine:

          name = [
          "apple",
          "orange",
          "banana"
          ]
          
          test = [""]
          
            for i = 0 to len( name ) loop
              clear()
              test[i] = name[i]
              print(test[i])
              update()
              sleep( 2 )
            repeat
          
          

          Did you mean to empty the array? If so, then use:

          test = []
          

          If you try to access test[0] after doing the above you will get an "Array index out of bounds" as we have just cleared it.

          I don't think you need the quotes ( " " ) in your array, even if it will hold strings. Arrays seem to be dynamic in size and type. So this also works:

          name = [
          "apple",
          "orange",
          1
          ]
          
          P 1 Reply Last reply Reply Quote 0
          • P
            petermeisenstein F @spt games last edited by

            @spt-games Okay so yeah i can let it empty thanks

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