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
1 registered members (TipmyPip), 18,449 guests, and 6 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
send_var crash #44066
04/11/05 02:02
04/11/05 02:02
Joined: Sep 2004
Posts: 157
J
jakeshields Offline OP
Member
jakeshields  Offline OP
Member
J

Joined: Sep 2004
Posts: 157
Hi, I'm making a fighting game and am currently making the multiplayer componenet. At this point i am trying to synchronise the move array and the character stats array between the client and the server. The connection is made and all is fine there, but when i try to sync the arrays i get a crash.

Here is the code that causes the crash.

Code:
 function init_remote_player(button_number,pan)  {
snd_PLAY(click_sound,100,0);
if (button_number == 1) {
i = 0;
j = 0;
if (connection == 3) {
while (i < human_stats.length) {
human_stats[i] = balanced_human[i];
send_var(human_stats[i]);
i+=1;
}
}
if (connection == 2) {
while (j < human2_stats.length) {
human2_stats[j] = balanced_human[j];
send_var(human2_stats[j]);
j+=1;
}



The code continues in a similar fashion for the other buttons.

If i click the button from the server, the client crashes.
If i click the button from the client, the server crashes.

Any ideas?

I've used send_var in prior code and it works great.

TIA,

JakeShields

Re: send_var crash [Re: jakeshields] #44067
04/11/05 02:25
04/11/05 02:25
Joined: Sep 2004
Posts: 157
J
jakeshields Offline OP
Member
jakeshields  Offline OP
Member
J

Joined: Sep 2004
Posts: 157
Hehe, solved it myself, the manual says that send_Var will send the whole array so i tried send_var without the index indicator

so send_Var(human_stats) works
send_Var(human_stats) crashes

the problem is that the doesn't give compile errors.

jakeShields


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