trying to convert a ladder for lite c. I know it's in c script, not much of a programmer but I'm trying to convert slinn's one from aum. could someo programming genius help? I can't work out why the engine errors when event_impact is called frown

Code:
Quote:

#include <acknex.h> // include for Pure Mode
#include <default.c> // default key functions

function ladder_event()
{
if(you)
{
if(you == player)
{
my.ENABLE_IMPACT = off;
vec_set(my.skill21,player.x);
vec_set(my.skill24,player.pan);

while(1)
{
proc_late();
vec_set(player.x,my.skill21);
vec_set(player.pan,my.skill24);
my.skill30 = c_move(player,nullvector,vector(0,0,(key_w-key_s)*my.skill1*time_step),ignore_passable|ignore_passents|glide); //move the player up or down
if((key_s && my.skill30 < 0.1) || (key_w && (player.z+player.min_z) > (my.z+my.max_z+player.max_z))) //if the ground or the end of the ladder is reached,
{
break; //stop the loop
}

vec_set(my.skill21,player.x); //stores the new position

wait(1);
}

wait(-0.1); //prevent the player from triggering the event again and again when leaving the ladder
my.enable_impact = on; //make the ladder again sensible for the player
}
}
}

//skill1: ClimpSpeed 10
ENTITY* ladder =
{
my.enable_impact = on;
my.event = ladder_event;

my.polygon = on;

c_setminmax(me);
}

void main()
{
video_mode = 9;
video_depth = 32;
video_screen = 1;
//d3d_antialias = 4;
//d3d_automaterial = 2;
fps_max = 35;
wait(1);
}



thanks in advance - mattcoles