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
5 registered members (Dico, AndrewAMD, TipmyPip, NewbieZorro, Grant), 15,791 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
A7 on_server bug? #153154
09/10/07 07:40
09/10/07 07:40
Joined: Aug 2007
Posts: 17
J
jedilq Offline OP
Newbie
jedilq  Offline OP
Newbie
J

Joined: Aug 2007
Posts: 17
Hi All!

I've got A7 pro, and I've been trying to get my multiplayer code to work. I got stumped when I tried to use on_server to call a function.

After I set up a server, and had a client connect to the server, somehow the on_server never worked. As a result, Locoweeds MP Tutorial didn't work for me, because the on_server never fired-off a function that send the server_says_start variable to the clients, so the clients could never get past that step.

However, when I edited the code so that I didn't need to check for server_says_start, the game proceeded on like normal. I could even call the function and send variables to and from the server by doing manual send_var() calls.

Hence, my conclusion is that on_server does not work. I haven't tried on_client yet but i will once I get to the right place in the tutorial.

Any ideas?

Thanks!

Re: A7 on_server bug? [Re: jedilq] #153155
09/10/07 08:03
09/10/07 08:03
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 there's an on_server bug, but the current A7 version has indeed a bug in sending functions and actions to the server under lite-C - see bug list. However everything should work under C-Script.

You can look into the Pong multiplayer example for learning how to use the on_server event under lite-C.

Re: A7 on_server bug? [Re: jcl] #153156
09/10/07 14:45
09/10/07 14:45
Joined: Aug 2007
Posts: 17
J
jedilq Offline OP
Newbie
jedilq  Offline OP
Newbie
J

Joined: Aug 2007
Posts: 17
Well, I took a look at the Pong multiplayer example, and it doesnt use on_server at all. It only uses on_client. So I'm still stuck...

Thanks for your input though...any idea when the multiplayer bugs will be resolved in Lite-C?

Thanks

Re: A7 on_server bug? [Re: jedilq] #153157
12/27/07 17:58
12/27/07 17:58
Joined: Feb 2002
Posts: 357
Florida
Zelek Offline
Senior Member
Zelek  Offline
Senior Member

Joined: Feb 2002
Posts: 357
Florida
I am having this EXACT problem. It seems on_server just isn't working at all. I am using A7 Commercial 7.06.

Re: A7 on_server bug? [Re: Zelek] #153158
12/28/07 05:16
12/28/07 05:16
Joined: Aug 2004
Posts: 1,305
New York
PrenceOfDarkness Offline
Serious User
PrenceOfDarkness  Offline
Serious User

Joined: Aug 2004
Posts: 1,305
New York
i think my on_server functio works fine. Maybe you have a slight bug somewhere else. try using the step by step debugging method just to make sure. Maybe the computer never makes it to the on_server line.


"There is no problem that can't be solved with time and determination." -me
prenceofdarkness for instant messages on AIM.

Looking for a model designer
PLEASE, SEND ME A PRIVATE MESSAGE OR EMAIL IF YOU'RE INTERESTED.
Re: A7 on_server bug? [Re: PrenceOfDarkness] #153159
02/24/08 19:30
02/24/08 19:30
Joined: Nov 2006
Posts: 193
England
RyuShinji Offline
Member
RyuShinji  Offline
Member

Joined: Nov 2006
Posts: 193
England
I'm Having the same problem ever since i switched to A7, Does anyone know if theres a way to fix it?

Re: A7 on_server bug? [Re: RyuShinji] #153160
02/24/08 22:04
02/24/08 22:04
Joined: Feb 2002
Posts: 357
Florida
Zelek Offline
Senior Member
Zelek  Offline
Senior Member

Joined: Feb 2002
Posts: 357
Florida
This still gives me problems, even in Loco's updated Lite-C code. I had to add a wait(-3) for the "people_connected" var to be sent. If I remove the wait, "people_connected" never gets updated on the client.

Code:

function server_called() {
if ((event_type == EVENT_JOIN) && (people_connected < MAX_CONNECTIONS)) {
wait(-3); //I have no idea why this is necessary, but it is
people_connected += 1; // another person connected
send_var(people_connected);



There's really no reason to have to wait THREE seconds for anything, but try it and see if it makes a difference. I still think there's a bug here somewhere.

Re: A7 on_server bug? [Re: Zelek] #153161
03/18/08 08:51
03/18/08 08:51
Joined: Jul 2006
Posts: 503
Australia
A
adoado Offline

User
adoado  Offline

User
A

Joined: Jul 2006
Posts: 503
Australia
I just recently had the same problem.

I followed Zelek's idea about adding a wait and it worked.
So this is not a bug? r do we just have to wait for the client to fully connect or something?

Thanks,
Adoado


Visit our development blog: http://yellloh.com
Re: A7 on_server bug? [Re: adoado] #153162
03/18/08 12:42
03/18/08 12:42
Joined: Oct 2004
Posts: 8
Thalandor Offline
Newbie
Thalandor  Offline
Newbie

Joined: Oct 2004
Posts: 8
I seem to be having the same issue, although for my the wait still does not work


Moderated by  HeelX, Spirit 

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