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
    The Maxon SDK Team is currently short staffed due to the winter holidays. No forum support is being provided between 15/12/2025 and 5/1/2026. For details see Maxon SDK 2025 Winter Holidays.

    Beginner-Problem: Examples don't work!

    Scheduled Pinned Locked Moved SDK Help
    2 Posts 0 Posters 187 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 21/03/2005 at 07:46, xxxxxxxx wrote:

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

      ---------
      Hello...

      Today, I read something about COFFEE as a possibility to write plugins for C4D. So, I decided to learn it. I've made some tutorials. After a while, the first example works. This very simple one:

        
      main()  
      {  
      println("Hello World!");  
      }  
      

      But when I want to use other examples, I always get COFFEE Errors in the console window.

      F.ex.:

        
      // Opens the above dialog with an exclamation mark icon  
      var result = TextDialog("Hello World!", DLG_OKCANCEL + DLG_ICONEXCLAMATION);  
        
      // Checks the result  
      if (result == DLG_R_OK)  
      {  
      TextDialog("You pressed OK!", DLG_OK);  
      }  
      

      COFFEE ERROR!
      (124) Syntax Error
      File: test2.cof
      Line: 2
      Row: ~25

      I have tested a lot of examples, but I always get such errors like "(118) Variable or function expected". What's wrong?

      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/03/2005 at 06:22, xxxxxxxx wrote:

        Did you put the code within a function block? You can't just have it stand-alone in the file. The simplest function block is the "main" you had in the first sample. A more interesting variant is to use MenuPlugin::Execute().

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