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
    • Unread
    • Recent
    • Tags
    • Users
    • Login

    Coffee Engine compile error

    Scheduled Pinned Locked Moved SDK Help
    6 Posts 0 Posters 463 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 28/09/2012 at 10:24, xxxxxxxx wrote:

      User Information:
      Cinema 4D Version:   12+ 
      Platform:   Windows  ; Mac  ;  Mac OSX  ; 
      Language(s) :     C++  ;

      ---------
      Hi,

      I have a Coffee object allocated that I do only destroy when my class is destroyed (so actually it can be alive from the beginning till the end of c4ds lifetime). It works but the issue I have is that when I Compile the script code (GeCoffeeCompileString) with this Coffee object it returns true only the first time. After that all compile calls result in an error with error code "Expression already defined" (at line 2, so "{" or directly main() if one assumes a follow up error). What is the reason for this? Am I missing something obvious?

      The script code is simply "main() { return 1.0; }"

      Do I really have to allocate and free a new instance for each compile call I do? At least this doesn't sound right to me. Or is this maybe a bug?

      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 01/10/2012 at 07:48, xxxxxxxx wrote:

        btw. it is also the case when I for example create the coffee class as a member of an object plugin for example (easiest test was to compile script code whenever the Message function is called...first time works, all following calls result in that error).

        Currently I am doing reallocation everytime. This works but it raises an overhead and performance issue as you can imagine. So it would be really great if this could be confirmed or if there was something I am missing. 😕

        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 01/10/2012 at 09:34, xxxxxxxx wrote:

          Hi,

          The same error is risen with the Coffee master object. It seems not possible to define more than once main() in a Coffee object.
          I'll ask the developers if there's a way to not having to allocate and free a Coffee object for each compile call.

          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 03/10/2012 at 05:06, xxxxxxxx wrote:

            thx Yannick

            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/10/2012 at 09:19, xxxxxxxx wrote:

              The developers confirmed it's a bug.

              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 29/10/2012 at 09:53, xxxxxxxx wrote:

                thanks Yannick.

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