I have made a simple script but i keep getting a error but there is nothing wrong with the script.
It maybe just me but i need to make sure.
I'm really new to programing but i cant see a problem, could it be a bug?.
Please Help.
the error says
<FONT* arial_font = "Arial#20b";>
PROJECT1.WDL 72:0 (); Keyword unknown FONT*
then a few more lines of error after that becuase of this line.
Heres my Script i made
#include <acknex.h> // include these predefined, needed files in our project
#include <default.c>
ENTITY* gplayer;
var walk_percentage;
var can_move;
var can_walk = 0;
Function main()
{
video_switch(7,0,1); // set full screen and 800/600 with no depth change
fps_max = 200; //set the frame rate this way game will run the same on all pc's
load_level("Project1.wmb"); //load the level
wait(2); // wait until the level is loaded
vec_set(camera.x,vector(-231 ,4 ,131));
camera.tilt = -12;
camera.pan = 0;
wait(-1);
while(1)
{
if (can_move < 100)
{
camera.x -=8 * time_step;
can_move +=8 * time_step;
wait(1);
}
else
{
can_walk = 1;
}
wait(1);
}
}
action player_actions
{
gplayer = me;//ponit the model is gplayer
my.shadow = on;
while(1)
{
if (can_walk == 1)
{
if (key_w) //if keyboard W is pressed move forward
{
c_move(my,vector(5.4* time_step,0,0),nullvector,glide);
ent_animate(my, "walk", walk_percentage, ANM_CYCLE); // "walk" animation loop
walk_percentage += 6 * time_step; // 3 = animation speed for "walk"
}
else
{
ent_animate(my, NULL, 0, 0); // reset all the animations
}
if (key_a) //if keyboard A is pressed pan + 2
{
my.pan+=4 * time_step;
}
if (key_d) //if keyboard A is pressed pan - 2
{
my.pan-=4 * time_step;
}
wait(1); //wait to next frame
}
wait(1);
}
}
FONT* arial_font = "Arial#20b"; // Arial, bold, a character has a height of 20 points
STRING* worldtext_str = "My First Project";
TEXT* world_txt =
{
pos_x = 10;
pos_y = 10;
string (worldtext_str) ;
flags = VISIBLE;
font = arial_font;
}