Sign in to follow this  
Followers 0
Shimgreen

Help with Networking

2 posts in this topic

#1 ·  Posted (edited)

Ok.... so i am creating a script for a game.

I have it set up on my GUI so if you push this certain button it will send data to server and port where the game is hosted on.

The reason I have it setup like this is so it will spam the server with the data wich this game is hosted on wich will cause the game to reset,

So the game will pretty much Crash/Reboot.

It seems to send the data to the server because when i close my program it will reset the server.

But i want it to send the data and then close session without having to close my program for it to exit the session causing it to reset.

I thought that the line of script below this would cause it to exit the session then the game would reset but it doesnt seem to do so...

if NOT $aaa = true Then TCPShutdown()

So i am wondering if anyone can please help me out, this is starting to hurt my brain lol.

GUISetState ()
TCPStartup()

Case $msg = $Button_4
GUICtrlSetData ($button_4,"Resetting 2")

if NOT $aa = true Then $socket = TCPConnect($ip, $port1)
sleep(400)
If @error Then MsgBox(0,"Error", "Unable to connect...")
GUICtrlSetData ($progressbar1,10)
if NOT $a = true Then TCPSend($socket, $Input_1)
if NOT $b = true Then TCPSend($socket, $Input_1)
GUICtrlSetData ($progressbar1,20)
if NOT $c = true Then TCPSend($socket, $Input_1)
if NOT $d = true Then TCPSend($socket, $Input_1)
GUICtrlSetData ($progressbar1,30)
if NOT $e = true Then TCPSend($socket, $Input_1)
if NOT $f = true Then TCPSend($socket, $Input_1)
GUICtrlSetData ($progressbar1,40)
if NOT $g = true Then TCPSend($socket, $Input_1)
if NOT $h = true Then TCPSend($socket, $Input_1)
GUICtrlSetData ($progressbar1,50)
if NOT $gg = true Then TCPSend($socket, $Input_1)
if NOT $ggg = true Then TCPSend($socket, $Input_1)
GUICtrlSetData ($progressbar1,60)
if NOT $i = true Then TCPSend($socket, $Input_1)
if NOT $j = true Then TCPSend($socket, $Input_1)
GUICtrlSetData ($progressbar1,70)
if NOT $k = true Then TCPSend($socket, $Input_1)
if NOT $l = true Then TCPSend($socket, $Input_1)
GUICtrlSetData ($progressbar1,80)
if NOT $m = true Then TCPSend($socket, $Input_1)
if NOT $n = true Then TCPSend($socket, $Input_1)
GUICtrlSetData ($progressbar1,90)
if NOT $o = true Then TCPSend($socket, $Input_1)
if NOT $p = true Then TCPSend($socket, $Input_1)
sleep(1000)
if NOT $aaa = true Then TCPShutdown()
sleep(400)
GUICtrlSetData ($progressbar1,100)

 GUICtrlSetData ($button_4,"Room 2")

for your guys information

$aaa = False

$aa = False

$a = False

$b = False

$c = False

$d = False

$e = False

$f = False

$g = False

$gg = False

$ggg = False

$h = False

$i = False

$j = False

$k = False

$l = False

$m = False

$n = False

$o = False

$p = False

$q = False

$r = False

$s = False

$t = False

$u = False

$v = False

$w = False

$x = False

$y = False

$z = False

Edited by Shimgreen

Share this post


Link to post
Share on other sites



Mate, all those variables look very confusing. I'd switch to something you can understand more ($DATA_NAME_FOR_IT), as tt could trip you up when you get into more complex things...

Cheers,

Brett

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0