Game Development Community

Trailing comment bug on the Mac

by Geoff Rowland · in iTorque 2D · 02/26/2009 (12:27 pm) · 3 replies

Ran into a strange problem today and wanted to share it with everyone (perhaps this is common knowledge). One of our programmers was using trailing comments like this

/// comment here ///

This code works without issue on the PC. However when running on the Mac, it would cause very odd things to happen - this specific comment was located in a Behavior and caused the behavior to not work correctly at all on the Mac. Removing the trailing comments solved the problem entirely.

#1
02/26/2009 (2:59 pm)
Is this iTGB specific? I know that TorqueScript has something called a DocBlock which I think is marked by '///' on each line, it's some kind of special comment, but I'm not sure what it's used for, that may be what's messing up for you.
#2
02/27/2009 (5:34 am)
I'm guessing it happens in normal TGB as well, but haven't tried it. So just to be clear

/// comment here ///

causes a problem...however:

/// comment here


is fine.
#3
02/27/2009 (8:47 am)
Good find, I didn't realize what was wrong and ended up rewriting a behavior into a non- behavior... looking back it was the one time I used this style of commenting.