-
not working...
In my multiplayer game, I'm trying to have the client request it's character's stats, the server sending them, and then the client receiving the stats and storing them in counters. Is this how you would do it.. 'cause it doesn't work..
Client requesting stats:
+ Channel: On sign on
- (under Mooclick) Player: Send "I wanna my stats"+"#"+P_GetName$("Mooclick") on subchannel 21 to Server
Server receiving request and sending stats:
+ Connection: On Client Message
+ SC_OnClientMsg_GetSubchannel( "Mooclick" ) = 21
+ ListGetAt$("StringParser",1)="I wanna my stats"
- (under Mooclick) Connection: Send GroupItemString$("Ini",listGetAt$("StringParser",2 ), "Level")+"#"+GroupItemString$("Ini",listGetAt$("St ringParser",2), "Mining")+"#"+GroupItemString$("Ini",listGetAt$("S tringParser",2), "Melee")+"#"+GroupItemString$("Ini",listGetAt$("St ringParser",2), "Long-Range")+"#"+GroupItemString$("Ini",listGetAt$("Str ingParser",2), "Sniping")+"#"+GroupItemString$("Ini",listGetAt$(" StringParser",2), "Magic")+"#"+GroupItemString$("Ini",listGetAt$("St ringParser",2), "Cooking")+"#"+GroupItemString$("Ini",listGetAt$(" StringParser",2), "Money")on subchannel 22 to Player
Client Receiving Message and storing in counters:
+ Player: On Server Message
+ P_OnServerMsg_GetSubchannel("Mooclick")=22
- (under counter 1) Set Counter to Val(listGetAt$("StringParser", 1))
- (under counter 2) Set Counter to Val(listGetAt$("StringParser", 2))
- (under counter 3) Set Counter to Val(listGetAt$("StringParser", 3))
- (under counter 4) Set Counter to Val(listGetAt$("StringParser", 4))
- (under counter 5) Set Counter to Val(listGetAt$("StringParser", 5))
- (under counter 6) Set Counter to Val(listGetAt$("StringParser", 6))
- (under counter 7) Set Counter to Val(listGetAt$("StringParser", 7))
- (under counter 8) Set Counter to Val(listGetAt$("StringParser", 8))
If you know what's wrong, can you please help me?
Thanks,
Matteo Kruijssen
-
Re: not working...
If you are sending them as strings, then why are you using the Val() function.
---EDIT---
I didn't notice you were using them to set counter values. The problem might actually be that your sending the wrong thing actually, because I believe that the ini object has a different expression for numbers.
-
Re: not working...
so I should send them as Val()?