Gamestudio Links
Zorro Links
Newest Posts
Newbie Questions
by fairtrader. 12/05/23 14:22
Zorro Trader GPT
by TipmyPip. 12/04/23 11:34
Square root rule
by Smallz. 12/02/23 09:15
RTest not found error
by TipmyPip. 12/01/23 21:43
neural function for Python to [Train]
by TipmyPip. 12/01/23 14:47
Xor Memory Problem.
by TipmyPip. 11/28/23 14:23
Training with command line parameters
by TipmyPip. 11/26/23 08:42
Combine USD & BTC Pairs In Asset Loop
by TipmyPip. 11/26/23 08:30
AUM Magazine
Latest Screens
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Tactics of World War I
Who's Online Now
1 registered members (AndrewAMD), 599 guests, and 3 spiders.
Key: Admin, Global Mod, Mod
Newest Members
fairtrader, hus, Vurtis, Harry5, KelvinC
19019 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
Page 1 of 2 1 2
how do i get the client id? #144257
07/29/07 03:50
07/29/07 03:50
Joined: Aug 2004
Posts: 1,305
New York
PrenceOfDarkness Offline OP
Serious User
PrenceOfDarkness  Offline OP
Serious User

Joined: Aug 2004
Posts: 1,305
New York
I really want to get started using send_var_id and send_string_id, however the manual gives no examples on how to use ANY _id function. Further more the manual stats that the event_join event_type gives off the client_id as it's 2nd argument. However we aren't told what type of variable the client_id is, nor are we show an example on how to store it.

The manual also says the client_id is stored into the struct of a client created entity, but again we are not shown how to retreat this client_id. Some clearing up would be nice.

I've asked on the multiplayer thread already but no one has been able to help me, so i decided to finally go ahead and ask conitec


"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: how do i get the client id? [Re: PrenceOfDarkness] #144258
08/01/07 03:47
08/01/07 03:47
Joined: Aug 2004
Posts: 1,305
New York
PrenceOfDarkness Offline OP
Serious User
PrenceOfDarkness  Offline OP
Serious User

Joined: Aug 2004
Posts: 1,305
New York
some help would be nice

Also i've created an entity on the client with ent_create, and i can't seem to control it on the server like i did in A6, is there some kind of change?


"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: how do i get the client id? [Re: PrenceOfDarkness] #144259
08/01/07 08:17
08/01/07 08:17
Joined: Mar 2002
Posts: 7,726
old_bill Offline
Senior Expert
old_bill  Offline
Senior Expert

Joined: Mar 2002
Posts: 7,726
jcl is on vacation, so give him another week to answer your question.


Success is walking from failure to failure with no loss of enthusiasm.
Re: how do i get the client id? [Re: old_bill] #144260
08/06/07 02:02
08/06/07 02:02
Joined: Aug 2004
Posts: 1,305
New York
PrenceOfDarkness Offline OP
Serious User
PrenceOfDarkness  Offline OP
Serious User

Joined: Aug 2004
Posts: 1,305
New York
thank u old bill, at least now i know whats up


"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: how do i get the client id? [Re: PrenceOfDarkness] #144261
08/06/07 05:59
08/06/07 05:59
Joined: Aug 2004
Posts: 1,305
New York
PrenceOfDarkness Offline OP
Serious User
PrenceOfDarkness  Offline OP
Serious User

Joined: Aug 2004
Posts: 1,305
New York
this is for JCL for when he gets back:

Code:

function server_event(STR,NUM)
{
client_name = STR;
client_id = NUM;
temp = NUM;
str_for_num(client_id_str,client_id);
wait(-1);
send_var_id(temp,client_id);
player = ent_create(testing_mdl,0,testing_function);
wait(-1);
player.skill1 = client_id;
}


everytime I go to use this script my game crashes and no reason is given... obviously there is a problem. I know it's send_var_id because when I comment it out the game doesnt crash.


"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: how do i get the client id? [Re: PrenceOfDarkness] #144262
08/06/07 10:21
08/06/07 10:21
Joined: Jul 2000
Posts: 27,967
Frankfurt
jcl Offline

Chief Engineer
jcl  Offline

Chief Engineer

Joined: Jul 2000
Posts: 27,967
Frankfurt
Your server event does not differentiate between event types - therefore you'll get a wrong ID. However, 7.04 also had a multiplayer bug that probably caused your crash.

client_id is a part of ENTITY, see atypes.h.

Re: how do i get the client id? [Re: jcl] #144263
08/06/07 21:22
08/06/07 21:22
Joined: Aug 2004
Posts: 1,305
New York
PrenceOfDarkness Offline OP
Serious User
PrenceOfDarkness  Offline OP
Serious User

Joined: Aug 2004
Posts: 1,305
New York
jcl... i'll give it a try later 2night, but right now the only thing that is being sent to the server is when the client joins... nothing else happens after that... but like i said let me give it a try.


"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: how do i get the client id? [Re: PrenceOfDarkness] #144264
08/07/07 02:45
08/07/07 02:45
Joined: Aug 2004
Posts: 1,305
New York
PrenceOfDarkness Offline OP
Serious User
PrenceOfDarkness  Offline OP
Serious User

Joined: Aug 2004
Posts: 1,305
New York
okay jcl i think i understood what you were saying.

The real problem i'm having but is that i can't seem to control the entity on the client side no matter what i do.

Code:

action testing_function()
{
wait(-2);
ent_sendnow(my);
// wait(-1);
proc_local(my,local_testing);
wait(-2);
// my.smask |= NOSEND; // lite-C
wait(-3);
// beep();beep();beep();
while(1)
{
wait(1);
my.pan += 10;
}
}

function main()
{
...
if(connection==2)
{
player = ent_create(testing_mdl,vector(0,0,50),testing_function);
wait(-1);
str_cpy(str_welcome,"Welcome Client");
}
...
}



All that happens is the player is created and thats it. The action function is simply telling the test model to increase it's pan by 1 in an endless while loop. When i create it on the server it's fine, but when I create it on the client, nothing happens at all, the model doesn't move on the server or the client... Why?


"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: how do i get the client id? [Re: PrenceOfDarkness] #144265
08/07/07 06:28
08/07/07 06:28
Joined: Jul 2000
Posts: 27,967
Frankfurt
jcl Offline

Chief Engineer
jcl  Offline

Chief Engineer

Joined: Jul 2000
Posts: 27,967
Frankfurt
testing_function() runs on the server, not on the client - you are aware of that?

Re: how do i get the client id? [Re: jcl] #144266
08/22/07 05:49
08/22/07 05:49
Joined: Aug 2004
Posts: 1,305
New York
PrenceOfDarkness Offline OP
Serious User
PrenceOfDarkness  Offline OP
Serious User

Joined: Aug 2004
Posts: 1,305
New York
yes JCL but if you look inside testing_function you'll see "proc_local(my,local_testing);".

The action local_testing is nothing complex. Here take a look:
Code:

action local_testing()
{
wait(-3);
// beep();beep();beep();
while(1)
{
wait(1);
my.pan += 10;
}
}



It's like it was completely ignoring proc_local. Is proc_local no longer valid?


"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.
Page 1 of 2 1 2

Moderated by  old_bill, Tobias 

Gamestudio download | chip programmers | 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