Maxon Developers Maxon Developers
    • Documentation
      • Cinema 4D Python API
      • Cinema 4D C++ API
      • Cineware 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
    • Unread
    • Recent
    • Tags
    • Users
    • Login

    COFFEE: 2 dimension array

    SDK Help
    0
    2
    189
    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
      Helper
      last edited by

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

      On 04/02/2006 at 05:20, xxxxxxxx wrote:

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

      ---------
      Hi @all,
      how can I fill a 2-dimension arry in cof ?

      I tried this, but ist doesent work..

      //new 2-dim-array
      arrpos = new(array, 12,1);
      ...
      //filling up with for
      ...
      arrpos[arrzaehler] [0]= (pos);
      arrpos[arrzaehler] [1]= (pos);
      ...
      //displaying value 1
      println(arrpos[0][0],arrpos[0][1]

      greeting from Freiburg, Germany

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

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

        On 04/02/2006 at 08:49, xxxxxxxx wrote:

        You say it is a 2-dimensional array, but the second dimension is only 1. The dimension is not the end index, but the number of elements per dimension.

        Therefore, arrpos[arrzaehler][1] is invalid. Make the array arrpos = new(array, 12, 2). Remember that array indices start at 0, but the dimension is a count.

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