THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED
On 05/03/2009 at 05:29, xxxxxxxx wrote:
User Information:
Cinema 4D Version: 10.5
Platform: Mac OSX ;
Language(s) : C.O.F.F.E.E ;
---------
Hello,
This is a COFFEE MenuPlugin. Status is a global variable. The aim is to toggle status everytime the plugin gets executed. Like this, the script works and outputs:
0 -> 1
1 -> 0
0 -> 1
But if I change the end of the first line to status = 1; the output gets weird:
1 -> 0
1 -> 0
1 -> 0
> Toggle::Execute(doc) \> { \> if (status == NULL) status = 0; \> print(status); \> status = !status; \> println(" -> " + tostring(status)); \> }
Changing status = !status; to
> if (status == 0) status = 1; else status = 0;
does not help either.
Any help would be appreciated. Thanks