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?