Code not working on PC, works on Mac
-
THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED
On 08/09/2003 at 11:17, xxxxxxxx wrote:
User Information:
Cinema 4D Version: 7.3
Platform: Windows ;
Language(s) : C.O.F.F.E.E ;---------
I'm trying to port some of my COFFEE plugins from Mac to PC, and a number of them use the following function I got here on plugincafe a while ago:CheckHierarchy(obj, stopAt) { Ê if (!obj) return NULL; Ê var next; Ê if (next = obj->GetDown()) return next; Ê if (next = obj->GetNext()) return next;ÊÊÊ Ê var up = obj; Ê while (up = up->GetUp()) Ê { ÊÊÊ if (up == stopAt) return NULL; ÊÊÊ if (next = up->GetNext()) return next; Ê }Ê }
But on load every plugin containing this function throws up the "Expression expected" error at the first line "if (!obj) ...". What's the problem and how do I fix it?
-
THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED
On 08/09/2003 at 13:58, xxxxxxxx wrote:
Perhaps it objects to the many Ê's in your code...
Jokes aside, perhaps there really is a character encoding issue. Try retyping that line in a PC editor and see if C4D stops complaining. Also, are you running this on an Armenian OS? (That shouldn't really matter, but you never know.)
If this doesn't help, try removing the first line just to see if it really is the cause. Sometimes these error messages point to the wrong line. -
THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED
On 09/09/2003 at 03:08, xxxxxxxx wrote:
You're right! Opened in WordPad, deleted all unnecessary spaces and it works. I think the spaces that caused problems are those that were in the code as a result of having copied and pasted the function from my web broser, other functions written on Mac don't create problems. Perhaps the browser used non-breaking spaces instead of normal ones. Thanks for your help.
-
THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED
On 09/10/2003 at 16:58, xxxxxxxx wrote:
I wrote a program that automatically strips Macintosh LF's and converts them to PC format so that the compiler does not get confused. It can convert an entire directory structure (and sub directories) in seconds.
It is LGPL and free to use. Enjoy.
http://www.universeunlimited.com/dox/mac2pc.cpp
I had the same problem. I spoke with one of the lead developers at C4D and he stated that they had corrected this issue in future releases.
Best Regards,
Dustin Juliano
Ethereal Evolution, Inc.