strange errors

Posted By: JGGamer

strange errors - 10/19/09 02:21

I don't understand what is going on here. I am following the manual and don't understand why

I am getting errors.

I used this code:

Code:
if (key_p) & (freeze_mode == 0) 
		{
			freeze_mode = 1;
		}


...and got the error:

Error in 'MAIN' line 100: syntax error

< [][]{ >


Earlier I had tried:

Code:
//The PATH keyword gives directories where template files can be found.
	PATH "C:\Program Files\GStudio7\projects\test";
	PATH "C:\Program Files\GStudio7\projects\test\templates\code";
	PATH "C:\Program Files\GStudio7\projects\test\templates\images";
	PATH "C:\Program Files\GStudio7\projects\test\templates\sounds";
	PATH "C:\Program Files\GStudio7\projects\test\templates\models";


and got this error:

Error in 'MAIN' line 8: 'PATH' undeclared identifier

I also tried:

Code:
// Function for toggling pause mode
function pauseGame()
{
	freeze_mode = 1;
	freeze_mode %= 2; // two switches
}

on_p = pauseGame;



...and nothing happens.
Could someone please help me with what is wrong?
Posted By: Ottawa

Re: strange errors - 10/19/09 13:33

Hi!


This
if (key_p) & (freeze_mode == 0)
should be

if ((key_p) && (freeze_mode == 0))
Posted By: JGGamer

Re: strange errors - 10/20/09 17:37

Thanks. I'm not getting the error anymore, but the pause function isn't working.
Do I need to use some sort of loop?
Posted By: gfxExp

Re: strange errors - 10/20/09 18:11

Originally Posted By: JGGamer
Thanks. I'm not getting the error anymore, but the pause function isn't working.
Do I need to use some sort of loop?


you should use on_p = pauseGame; within main function. laugh
Posted By: Ottawa

Re: strange errors - 10/20/09 18:45

Hi!

This should be changed if your working with Lite-C
Quote:

PATH "C:\Program Files\GStudio7\projects\test\templates\models";



try
#define PRAGMA_PATH "..\\Models";

If you have not already done this,
You should also make your own folder for your models and your works.
© 2024 lite-C Forums