Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories

Sending data

SquillsSquills Member Posts: 12
Hello, I am using ServerSocket and ClientSocket,
and I can get it to send one item and read one item but how can i send two. exampel

//Attched to a button
ClientSocket1->Socket->SendText(Hero); //hero is var

//inside event ServerSocketRead
vsHero = Socket->ReciveText();

I got that to work... but this is what I want

//Attached to a button
ClientSocket1->Socket->SendText(Hero); //hero is var
ClientSocket1->Socket->SendText(AttackDamage); //AttackDamage is var

//inside event ServerSocketRead
vsHero = Socket->ReciveText();
vsAttackDamage = Socket->ReciveText();


but problem is it runs the event ServerSocketRead two times when pressing the button.
The first time
vsHero = AttackDamage
vsAttackDamage = null

the second time
vsHero = Hero
vsAttackDamage = Null

So my question is How can i get vsHero = Hero and vsAttackDamage = AttackDamage buy only pushing the button once?
thanks
squills

Sign In or Register to comment.