Maxon Developers Maxon Developers
    • Documentation
      • Cinema 4D Python API
      • Cinema 4D C++ API
      • Cineware API
      • ZBrush Python API
      • ZBrush GoZ API
      • Code Examples on Github
    • Forum
    • Downloads
    • Support
      • Support Procedures
      • Registered Developer Program
      • Plugin IDs
      • Contact Us
    • Categories
      • Overview
      • News & Information
      • Cinema 4D SDK Support
      • Cineware SDK Support
      • ZBrush 4D SDK Support
      • Bugs
      • General Talk
    • Recent
    • Tags
    • Users
    • Login

    COFFEE array syntax

    Scheduled Pinned Locked Moved SDK Help
    5 Posts 0 Posters 414 Views
    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.
    • H Offline
      Helper
      last edited by

      THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED

      On 25/09/2011 at 01:08, xxxxxxxx wrote:

      User Information:
      Cinema 4D Version:   11.5 
      Platform:   Windows  ;   
      Language(s) :   C.O.F.F.E.E  ;

      ---------
      I try to use array syntax from the documentation but its not working, Can you guys help me?

      var TXT_Cur = new(array,3);

      Error: syntax error

      1 Reply Last reply Reply Quote 0
      • H Offline
        Helper
        last edited by

        THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED

        On 25/09/2011 at 02:31, xxxxxxxx wrote:

        works fine here on R12.

        var arr = new(array, 3);
        println(arr);

        1 Reply Last reply Reply Quote 0
        • H Offline
          Helper
          last edited by

          THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED

          On 27/09/2011 at 06:15, xxxxxxxx wrote:

          I can't confirm. It's working fine here.

          cheers,
          Matthias

          1 Reply Last reply Reply Quote 0
          • H Offline
            Helper
            last edited by

            THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED

            On 28/09/2011 at 03:01, xxxxxxxx wrote:

            I was trying to declare an array as a global variable, I guess its not passable .

            Is there any other form for array declaration (LIKE: var arr = {"1","23","456"};) ?

            Thanks

            1 Reply Last reply Reply Quote 0
            • H Offline
              Helper
              last edited by

              THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED

              On 28/09/2011 at 05:22, xxxxxxxx wrote:

              AFAIK not.
              And you are right, you cannot initialize an array globally. Use this instead:

              var arr;

              int main(doc, op) {
                if (!arr) {
                    arr = new(array, 3);
                    arr[0] = "MyData 0";
                    arr[1] = 32;
                    arr[2] = doc->GetActiveObject();
                }
                // ...
              }

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