Hi, its me again.
Iam converting LocosMPTut.
Iam at the point, where i should do the first testrun.
But my client always crashed, wenn he gets the updated Var from server!

Something with this statement from jcl?
Quote:

It is just a different function for accessing lite-C variables instead of C-Script variables. send_var and send_skill currently only support C-Script variables. Lite-C variables and structs will be implemented in a future version.





Code:
 
var people_connected = 0;

function server_called()
{
// if new player connected, increment people connected
if ((event_type == EVENT_JOIN) && (people_connected <= MAX_CONNECTIONS))
{
people_connected += 1; // another person connected
wait(-5); // wait for the client to load the lvl
send_var(people_connected); // send number of people connected
}
...
}

function startup()
{
on_server = server_called; // on server event, call server_called()
}

function main()
{
...
startup();
...
}



Last edited by Black_Sheep; 07/20/07 23:32.

A7 Commercial.