Ankündigung

Einklappen
Keine Ankündigung bisher.

X1 Logic Node: Scripting - One block. Endless possibilities.

Einklappen
X
 
  • Filter
  • Zeit
  • Anzeigen
Alles löschen
neue Beiträge

    #16
    Zitat von willisurf Beitrag anzeigen
    Is there a small copy&paste error in the string examples?
    Code:
    OUT1 = IN1.toString().substring(0, 5); // Take the first 5 characters (start at character 0)
    
    OUT1 = IN1.toString().substring(0, 5); // Trim spaces​

    you are right! The last one should be:
    PHP-Code:
    OUT1 IN1.toString().trim(); 
    ​I will correct the examples. Thanks!

    Kommentar


      #17
      Thx for the great work i really like your Logic Node, but i am facing the problem with syntax error while using python.

      I'm using your script converter from multli-line to single-line and paste it into GPA.

      Here is my example:
      Input:
      import time

      now = time.time()​​
      if 'running' not in STATE:
      STATE['running'] = 0​
      Output:
      import time now = time.time() if 'running' not in STATE: STATE['running'] = 0
      GPA Error:
      Script error: SyntaxErrorException: unexpected token 'now'


      Is it only me or is it a common issue?
      Thanks!

      Kommentar


        #18
        Zitat von shindig632 Beitrag anzeigen
        Thx for the great work i really like your Logic Node, but i am facing the problem with syntax error while using python.

        I'm using your script converter from multli-line to single-line and paste it into GPA....

        Thanks!

        Hi shindig632 ! You are absolutely right. My Script converter doesn't handle the Python code very well at this moment.. I need to fix that.

        For the time being, please create a Oneliner yourself:
        PHP-Code:
        import timenow time.time(); if 'running' not in STATESTATE['running'] = 0​ 
        Or ask your friend ChatGPT or CoPilot to make it a OneLiner. In the mean time, I will fix the Script Converter and report it here when it works 100% for the Python code.

        Kommentar

        Lädt...
        X