Shimgreen Posted August 23, 2008 Share Posted August 23, 2008 (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. expandcollapse popupGUISetState () 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 August 23, 2008 by Shimgreen Link to comment Share on other sites More sharing options...
BrettF Posted August 23, 2008 Share Posted August 23, 2008 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 Vist my blog!UDFs: Opens The Default Mail Client | _LoginBox | Convert Reg to AU3 | BASS.au3 (BASS.dll) (Includes various BASS Libraries) | MultiLang.au3 (Multi-Language GUIs!)Example Scripts: Computer Info Telnet Server | "Secure" HTTP Server (Based on Manadar's Server)Software: AAMP- Advanced AutoIt Media Player | WorldCam | AYTU - Youtube Uploader Tutorials: Learning to Script with AutoIt V3Projects (Hardware + AutoIt): ArduinoUseful Links: AutoIt 1-2-3 | The AutoIt Downloads Section: | SciTE4AutoIt3 Full Version! Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now