Navigation

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

    Help me debug my program please

    Help
    3
    10
    399
    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.
    • F
      Flopglop last edited by

      I am making a filesystem for fuze so you can have multiple files in a program, and i have a very wierd bug.
      Anything that has a very long filename refuses to be read, and that is a shame since i need to fix that before I add anything else to it.
      Anyway, if you want to give a shot at fixing it the downloade code is N218XMND5W. The code is not aproved right now, so if you really want to get it here is my friend code: SW-2850-8867-8393

      pianofire 1 Reply Last reply Reply Quote 0
      • pianofire
        pianofire Fuze Team @Flopglop last edited by

        @Flopglop This is really interesting. I was thinking of doing something similar myself. I will take a look later

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

          I have mucked around for a few times with the file function.
          The first time I just kept on increasing the seek function by 10 and writing stuff there and it seemed like I had a megabyte to play with and then I thought thats heaps.
          But when I tried to use it in a program it gave an error it might have been my programing error but I then thought it was only 500 characters long.
          Gave it another go and it seems there is a limit of 7700 character limit but may be Im doing something wrong. But it would be nice if the documentation stated the real size of the file system cos I still don't know if the way I'm using it is the problem or there is just a hard limit or what's going on.

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

            Well i haven't found the limit (yet). I have just successfully written and read back 100K characters

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

              OK I am up to 10MB. It is a repeating pattern so it does compress very well. I will try with random characters

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

                Ok thank you very much.
                I'm using a push and pop style with a standard length maybe my various problems are a result of opening and closing the file repeatedly ?

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

                  Wow 10 megabyte that you can ? Pass on in your share code is that right. If true that opens up a lot of things that I thought were not possible in fuze.
                  Gotta get on top of this.

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

                    It was just a simple repeating pattern that was written and then read back sequentially (no seeks)

                    string = ""
                    for i = 0 to 64 loop
                      string += "0123456789ABCDEF"
                    repeat
                    printAt( 0, 0, "Open file" )
                    target = 10240
                    handle = open()
                    count = 0
                    for i = 0 to target loop
                      clear()
                      count += 1024
                      printAt( 0, 1, "Write to file: ", string )
                      printAt( 0, 2, "Total Bytes: ", count )
                      printAt( 0, 3, len(string) )
                      write( handle, string )
                      update()
                    repeat
                    printAt( 0, 2, "Close file" )
                    close( handle )
                    
                    printAt( 0, 3, "Open file" )
                    handle = open()
                    count = 0
                    for i = 0 to target loop
                      clear()
                      count += 1024
                      message = read( handle, 1024 )
                      printAt( 0, 1, "Read from file: ", message )
                      printAt( 0, 2, "Total Bytes: ", count )
                      update()
                    repeat
                    close( handle )
                    sleep(3)
                    
                    1 Reply Last reply Reply Quote 0
                    • xevdev
                      xevdev F last edited by

                      Had a look at what I wrote the other day and ran it again. What I thought was locking up fuze was that I didn't leave it enough time to complete all the stuff I got it to do so when I let it ran for a while it completed what I wanted. Too use to instant gratification I guess.
                      Thank you for clearing that up for me.

                      1 Reply Last reply Reply Quote 1
                      • F
                        Flopglop @pianofire last edited by pianofire

                        I don't know what I have done but it now works. Not well, but at least it doesn't crash, so ¯_(ツ)_/¯
                        I'll try to attach a gif of the program so you can see what I mean.
                        https://imgur.com/xuQ1Rqk

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