Still didn't work. Windows just says not responding and I have to close it via the task bar. Here's the sructure and code.

Folder:
...........player.mdl
...........main.c
...........player.c
...........moving.wmb

I added too hollow cubes, textured them added a camera and it was working before I began coding.


here's the edited codes

main.c:

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

#include "player.c";

function main()
{
   video_aspect = 1.333; // enforce 4:3 mode if you do not want widescreen in effect
	video_mode = 7; // start resolution 800 x 600
	video_screen = 1; // start in fullscreen mode 	
	video_depth = 32; // otherwise 32 bit mode
   wait (1);
	
	level_load("moving.wmb");
}



////////////////////////////////////////

Here's player.c:

Code:
//////////////////////////////////////////////////////////////////////

#define move_x skill22  // movement skills
#define move_y skill23
#define move_z skill24
#define force_x skill25
#define force_y skill26
#define force_z skill27
#define velocity_x skill28
#define velocity_y skill29
#define velocity_z skill30

#define animate skill31  ///animation skills
#define animate2 skill32
#define animblend  skill33
#define currentframe skill34
#define blendframe  skill35


#define z_offset skill50 //gravity and jumping skills
#define jumping_mode skill51
#define gravity  skill52
#define movement_mode skill53 //4 various movements, mainly combat
#define moving skill54

#define hit_by_player skill55
#define entity_type skill56

VECTOR* temp;


function handle_movement() {
	temp.x = -1000;
	temp.y = 0;
	if(key_w ==1) { temp.x = camera.pan; }
	if(key_s ==1) { temp.x = camera.pan + 180; }
	if(key_a ==1) { temp.x = camera.pan + 90; }
	if(key_d ==1) { temp.x = camera.pan - 90; }
   if(temp.x != 1000) { temp.y = 15 * time_step; }
   my.move_x = fcos(temp.x, temp.y);
   my.move_y = fsin(temp.x, temp.y);
   c_move(my, nullvector, my.move_x, USE_AABB | IGNORE_PASSABLE | GLIDE);
   
}


function handle_camera() { 
    //place cam behind player
    vec_set(camera.x, vector(my.x + fcos(my.pan, -200), my.y + fsin(my.pan, -200), my.z + 80));
    vec_diff(temp.x, my.x, camera.x); //make cam look towards player
    vec_to_angle(camera.pan, temp.x);
}

action player_action()
{
	set(my, SHADOW);
	while(1); {
		handle_movement();
		handle_camera();
		wait(1);
	}
}




I don't really know how to use the code tags.... dunno if I got it.


I know I can.