Hallo !

Ich versuche gerade einen C Script Code in Lite C umzuäandern

Ich habe mit hilfe des Handbuchs schon einige Zeilen verbessert

aber jetzt weiß ich auch nicht weiter weil ich einen Syntax

Error bekomme obwohl es genau so im Handbuch steht

Code:
[/code]
action flashlight()
{

while (player == NULL) {wait (1);}
//my.passable = On;
while (vec_dist (player.x, my.x) > 100) {wait (1);}
my.INVISIBLE  =  ON;    Hier Syntax Error
my.lightred = 200;
my.lightgreen = 200;
my.lightblue = 200;
snd_play(grab_light, 70, 0);
while (1)
{
while (energy > 0 && flash_enabled == 1)
{
my.lightrange = 200;
temp.x = max_dist * cos(player.pan) * cos(camera.tilt) + player.x+100;
temp.y = max_dist * sin(player.pan) * cos(camera.tilt) + player.y;
temp.z = max_dist * sin(camera.tilt) + player.z+20;
trace_mode = ignore_models + use_box;
my.skill1 = trace (player.x, temp);
if (my.skill1 != 0)
{
temp.x = (my.skill1 - 60) * cos(player.pan) * cos(camera.tilt) + player.x;
temp.y = (my.skill1 - 60) * sin(player.pan) * cos(camera.tilt) + player.y;
temp.z = (my.skill1 - 60) * sin(camera.tilt) + player.z;
vec_set (my.pos, temp);
}
energy -= 0.5 * time;
wait (1);
}
my.lightrange = 0;
wait (1);

}
}

function enable_flashlight()
{
//PLAY_SOUND flashlight,60;
flash_enabled += 1;
flash_enabled %= 2;
wait(1);
ent_create(cell,player.pos,battery_pickup);

}

on_f = enable_flashlight; // press the "F" key to use the flashlight

[code]



Wissen ist macht.
Nichts wissen macht auch nichts.

A7.86