Dark_Samurai, i already have a question and a problem.

Click to reveal..

//------------------------------------------------------------------------------------------
//
//
//------------------------------------------------------------------------------------------
void start_clientserver()
{
//Client-Server Modus:
enet_init_server(2300,4,_str("")); //Initializes the server
enet_init_client(_str("127.0.0.1"),2300,_str("")); //Initializes a client
//which connects over the localhost with the server
while(enet_get_connection() == 3) //as long as the client-server mode consists
{
enet_server_poll(); //...needs to be called every frame!
enet_client_poll();
wait(1);
}
}




//------------------------------------------------------------------------------------------
//
//
//------------------------------------------------------------------------------------------
function main()
{
enet_init(); //ENet is initialized

randomize();
fps_max = 60;
video_mode = 8;
video_depth = 32;
video_screen = 2;
time_smooth = 0.9;
fog_color = 1;
camera.fog_end = 75000;

start_clientserver();
wait(-0.5);

level_load("test.wmb");
//enet_set_level("test.wmb");
wait(5);
enet_ent_synchronize();
wait(-0.5);

camera.x = camera.y = camera.tilt = wheel_i = vehicle_i = 0;

on_e = reset_vehicle_manually;
on_f1 = main;
ph_setgravity(vector(0, 0, -320 * 1.4));
ph_setcorrections(25000, 0.05);


camera.x = -500;
camera.y = -500;
camera.z = 150;
camera.pan += 45;
camera.tilt -=15;


shadow_stencil = 3;
//vector (random(200), random(200), 50)
player = enet_ent_create(_str("aut_f360.mdl"), nullvector, vehicle);

wait(-0.5);


}


after running the code it works fine until it reaches the enet_ent_create function. if i comment that out it works okay. why it wont create an entity?



SOLVED!!! But you must update manual cause this is major error. instead of: enet_ent_create(_str("aut_f360.mdl"), nullvector, vehicle); it goes: enet_ent_create(_str("aut_f360.mdl"), nullvector, _str("vehicle"));
you didnt mention in manual that it needs that _str part for action string.





Last edited by cerberi_croman; 11/11/08 19:52. Reason: SOLVED


Ubi bene, ibi Patria.