Gamestudio Links
Zorro Links
Newest Posts
Zorro 2.70
by jcl. 09/29/25 09:24
optimize global parameters SOLVED
by dBc. 09/27/25 17:07
ZorroGPT
by TipmyPip. 09/27/25 10:05
assetHistory one candle shift
by jcl. 09/21/25 11:36
Plugins update
by Grant. 09/17/25 16:28
AUM Magazine
Latest Screens
Rocker`s Revenge
Stug 3 Stormartillery
Iljuschin 2
Galactic Strike X
Who's Online Now
0 registered members (), 17,416 guests, and 5 spiders.
Key: Admin, Global Mod, Mod
Newest Members
krishna, DrissB, James168, Ed_Love, xtns
19168 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
Page 1 of 2 1 2
Anything wrong with "send_var" ??? #142475
07/20/07 23:31
07/20/07 23:31
Joined: Jul 2004
Posts: 38
Germany, NRW
B
Black_Sheep Offline OP
Newbie
Black_Sheep  Offline OP
Newbie
B

Joined: Jul 2004
Posts: 38
Germany, NRW
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.
Re: Anything wrong with "send_var" ??? [Re: Black_Sheep] #142476
07/20/07 23:44
07/20/07 23:44
Joined: Oct 2006
Posts: 873
S
Shadow969 Offline
User
Shadow969  Offline
User
S

Joined: Oct 2006
Posts: 873
send_var_to(NULL,people_connected);//correct
you should have either A7 COMM or PRO

Re: Anything wrong with "send_var" ??? [Re: Shadow969] #142477
07/22/07 15:21
07/22/07 15:21
Joined: Jul 2004
Posts: 38
Germany, NRW
B
Black_Sheep Offline OP
Newbie
Black_Sheep  Offline OP
Newbie
B

Joined: Jul 2004
Posts: 38
Germany, NRW
this doesnt work too!
The Client crushed at the same point.
I can setup my watch at this.
At the point he find the server in the engine window, i can count the 5 secounds of the wait(-5) and than the client crash.
I own a A7 Com btw (eddited my signature for this).
Any other ideas? Or do u need more code?


A7 Commercial.
Re: Anything wrong with "send_var" ??? [Re: Black_Sheep] #142478
07/22/07 15:42
07/22/07 15:42
Joined: Apr 2006
Posts: 1,551
Netherlands
D3D Offline
Serious User
D3D  Offline
Serious User

Joined: Apr 2006
Posts: 1,551
Netherlands
Yeah I ask the same question to Conitec, but no answer. Why do we need to compile our program to executable and see if the function works by executing the program instead of doing it from SED? The Test Run doesn't work with these functions!

SED should have a option to execute the published (compiled) executable. For now this just stay confusing. Because you are used to Test Run. So in other words: Your program is working (i think), it's just that you need to compile it and run the executable instead.


smile
Re: Anything wrong with "send_var" ??? [Re: D3D] #142479
07/22/07 16:04
07/22/07 16:04
Joined: Jul 2004
Posts: 38
Germany, NRW
B
Black_Sheep Offline OP
Newbie
Black_Sheep  Offline OP
Newbie
B

Joined: Jul 2004
Posts: 38
Germany, NRW
no, this is not right here. I had published the program and it happens too.
its very strange... the original code of the tutoriall (all is coded in C-Script) works fine.


A7 Commercial.
Re: Anything wrong with "send_var" ??? [Re: Black_Sheep] #142480
07/22/07 17:00
07/22/07 17:00
Joined: Apr 2006
Posts: 1,551
Netherlands
D3D Offline
Serious User
D3D  Offline
Serious User

Joined: Apr 2006
Posts: 1,551
Netherlands
From SED prefs / XP Console
SERVER -sv -cl -pl Observer -diag
CLIENT -cl -pl ThePlayer -diag
download

Code:
#include <acknex.h>
#include <default.c>

#define MAX_CONNECTIONS 8

FONT* arial_font = "Arial#20b";

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()
}

PANEL* pConnectDisplay =
{
digits(25,25,2,arial_font,1,people_connected);
flags = VISIBLE;
}

function main()
{
fps_max=60;
screen_color.blue=125;
startup();
}




smile
Re: Anything wrong with "send_var" ??? [Re: D3D] #142481
07/22/07 17:19
07/22/07 17:19
Joined: Jul 2004
Posts: 38
Germany, NRW
B
Black_Sheep Offline OP
Newbie
Black_Sheep  Offline OP
Newbie
B

Joined: Jul 2004
Posts: 38
Germany, NRW
This test code dont work!
Its the same as my own code.
After several restarts of the host and the server, there is someting new...
Sometimes the Client didnt crushed after the 5 secounds, but he didnt get the actual var from the server. Ive started a secound client and the first client didnt get the var here too (the secound client crashed but the server count the var upwards).
Hmm whats up with my Engine?
Iam beleaving it depends on Vista... grml...
"Run it as Administrator" dont solve the problem.
Disabling the Windows Firewall dont solve it too.

Any new ideas?
Btw, thx for your help.

Last edited by Black_Sheep; 07/22/07 17:28.

A7 Commercial.
Re: Anything wrong with "send_var" ??? [Re: Black_Sheep] #142482
07/22/07 17:29
07/22/07 17:29
Joined: Apr 2006
Posts: 1,551
Netherlands
D3D Offline
Serious User
D3D  Offline
Serious User

Joined: Apr 2006
Posts: 1,551
Netherlands
This works! I tested it myself. Oh and I don't know about Vista just yet. Try running it on a computer with XP if it works you'll know the answer.


smile
Re: Anything wrong with "send_var" ??? [Re: D3D] #142483
07/22/07 19:27
07/22/07 19:27
Joined: Jul 2004
Posts: 38
Germany, NRW
B
Black_Sheep Offline OP
Newbie
Black_Sheep  Offline OP
Newbie
B

Joined: Jul 2004
Posts: 38
Germany, NRW
All right... my might with WinXP tested it and it works as u said...
hmm.. maybee i ask conitec for vista support.


A7 Commercial.
Re: Anything wrong with "send_var" ??? [Re: Black_Sheep] #142484
07/23/07 07:39
07/23/07 07:39
Joined: Jul 2000
Posts: 28,024
Frankfurt
jcl Offline

Chief Engineer
jcl  Offline

Chief Engineer

Joined: Jul 2000
Posts: 28,024
Frankfurt
I don't think that the problem is Vista related, but it's possible that there's some problem with DirectPlay on your system. Vista contains DX9 and DX10; A7 uses DX9. You can check with the DxDiag program whether DirectPlay works on your system or not.

- Still, even if it doesn't work it shouldn't crash. Can you post an acklog.txt of such a crash?

Page 1 of 2 1 2

Moderated by  HeelX, Lukas, rayp, Rei_Ayanami, Superku, Tobias, TWO, VeT 

Gamestudio download | Zorro platform | shop | Data Protection Policy

oP group Germany GmbH | Birkenstr. 25-27 | 63549 Ronneburg / Germany | info (at) opgroup.de

Powered by UBB.threads™ PHP Forum Software 7.7.1