The reason you are getting this error is because you are mixing both scripting languages together > c-script and lite-c.

my.emask |= ENABLE_SCAN; is lite-c
my.ENABLE_SCAN = ON; is c-script

You should decided which language you are going to write the game in as they cannot be used together (normally). I advise lite-c, its has more features than c-script.

Then do the workshops from the downloads page. Make sure you save your script file as .c if you are using lite-c and .wdl if you are using c-script.

Here is a go at converting your code. NOTE : i haven't tested this...

C-script>
Code:


function operate() // scan nearby doors or switches for operating them
{
   c_scan(camera.x,camera.pan,vector(800,800,1500),SCAN_ENTS);
}

function scan_event() 
{
if (event_type == EVENT_SCAN) 
  {
	my.skill3 = 1;  // sets door movement flag to the move state
	return;
  }
}

action rotating_door() // action for rotating door
{

    my.ENABLE_SCAN = ON; 
    my.event = scan_event;
	
	while(my.skill3==1) {
  		my.pan+=3;
  		wait(1);
	}
}

function main()
{
	on_ctrl=operate;
	
}

Lite-C>

Code:

#include <acknex.h>
#include <default.c>

function operate() // scan nearby doors or switches for operating them
{
   c_scan(camera.x,camera.pan,vector(800,800,1500),SCAN_ENTS);
}

function scan_event() 
{
if (event_type == EVENT_SCAN) 
  {
	my.skill3 = 1;  // sets door movement flag to the move state
	return;
  }
}

action rotating_door() // action for rotating door
{

    my.emask |= ENABLE_SCAN; 
    my.event = scan_event;
	
	while(my.skill3==1) {
  		my.pan+=3;
  		wait(1);
	}
}

function main()
{
	on_ctrl=operate;
	
}


That should work, but the most important thing is that you decide upon which language to use and stick to it.

Last edited by DJBMASTER; 07/27/08 02:20.