GameMonkey Script
http://www.gmscript.com/gamemonkey/forum/

"//" comments not working for me?!
http://www.gmscript.com/gamemonkey/forum/viewtopic.php?f=6&t=560
Page 1 of 1

Author:  benji [ Wed Oct 06, 2010 11:52 am ]
Post subject:  "//" comments not working for me?!

Hi all!

I`m starting with GM and doing some testing I found that the "//" comments are causing a parse error. Block comments are working just fine. Anyone idea what I can be doing wrong?

Code:
/*==== NOT OK ===*/
print("Hello, GM World! 1"); // say Hello to GM - everything is just fine until here
print("Bye, GM World! 1"); // say Bye - this line is not executed

/*===  OK ===*/
print("Hello, GM World! 2"); /* say Hello to GM - everything is just fine until here */
print("Bye, GM World! 2"); /* say Bye - this line is executed as it should be*/

Version is 1_27_2.
Thanks. :)

Author:  Greg [ Wed Oct 06, 2010 2:09 pm ]
Post subject:  Re: "//" comments not working for me?!

Welcome to the forum benji :)
I'm not sure what is going wrong for you. I executed your code with GME v1.27.2 and it ran fine. Can you provide any more details? Platform, compiler, loading from file or string etc?

Author:  benji [ Wed Oct 06, 2010 6:27 pm ]
Post subject:  Re: "//" comments not working for me?!

Hi, Greg! Platform is Win XP, IDE - VisualStudio 2008, script is loaded from file. But nevermind, it looks like the problem was in loading and manging the string. Now evetything works as expected.Thanks for the help and the nice script language. See you around! ;-)

Page 1 of 1 All times are UTC
Powered by phpBB® Forum Software © phpBB Group
https://www.phpbb.com/