Navigation

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

    Usage questions

    Help
    2
    3
    222
    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.
    • T
      TheIncgi last edited by TheIncgi

      Hi everyone!
      I'm looking to find some information I could not locate in the documentation.

      I've got a bunch of questions, every bit of help is appreciated. Thanks in advance to anyone that replies!

      If there is a proper way to check what type of variable has been passed into a function
      (I've found you can check between string and number with (x+0)==x, but nothing for other types like arrays or structs)

      If there is a way to delete data from the end of the file (from open()) to reduce it's size again

      if you can store chr(0) in a string to store 0 in the file for binary like formats (since write requires a string and read returns one too) or a way to read a byte / byte[] from a file

      Any type of error handling (protected function calls, try catch or whatever else?)

      1. ✓ Answered
        Any way to run code from another script/program without having to copy and paste into each file?
        [No, I'm afraid not at this point] (Martin)

      2. ✓ Answered
        A way to check if the analog sticks are pressed like buttons?
        [Yes - read the controls into a var (c for example) and then test for c.lc or c.rc] (Martin)

      3. ✓ Answered
        Any way to get the script to/from the switch without manually copying?
        [As per 5 - not at this point in time. This is a restriction we have to work with from Nintendo at this time.] (Martin)

      Any way to check if an element exists in a struct or iterate the elements?
      (I see printing a struct serializes it nicely, but there doesn't seem to be a way to convert it to a string)

      [Edited to included answers for questions ]

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

        I can answer a few very quickly...

        Any way to run code from another script/program without having to copy and paste into each file?

        No, I'm afraid not at this point

        A way to check if the analog sticks are pressed like buttons?

        Yes - read the controls into a var (c for example) and then test for c.lc or c.rc

        Any way to get the script to/from the switch without manually copying?

        As per 5 - not at this point in time. This is a restriction we have to work with from Nintendo at this time.

        1 Reply Last reply Reply Quote 1
        • T
          TheIncgi last edited by

          Thanks for the quick reply!

          Makes sense that they'd have that restriction now that you mention it.

          Edited the Joycon test program to include lc and rc, this works, thanks again!

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