I have no idea why, but for some reason, I keep getting a "number syntax error" for this script:
entity* player;
var player_x;
var player_y;
var player_z;
action carl
{while(1)
{player = my;
player_x = my.x;
player_y = my.y;
player_z = my.z;
my.x += key_force.y * time;
my.y += key_force.x * time;
wait(1);
}
}
view player_camera
{layer = 1;
pos_x = 0;
pos_y = 0;
size_x = 256;
size_y = 192;
arc = 45;
aspect = 1;
offset_x = 0;
offset_y = 0;
ambient = 10;
fog = 10;
flags = visible;
pan = 0;
tilt = -10;
roll = 0;
x = (player_x + 5); //the error comes up right here
y = 0;
z = 0;
}
I don't understand why it's doing this, considering that player_x is a global variable and should be able to be used in initializing other variables, right?