A little error ? [Q.Q]

06/22/2012 16:40 Hybrid~#1
Hey guys...
So I was working on the new version of my S4League trainers... And i wanted to set a HotKey to hide/show the GUI
Since this func killed me every time . . .
Code:
Global $Paused
   HotKeySet( "{F9}", "Hide")
   HotKeySet( "{F10}","UnHide")
   While 1
	  Sleep(100)
	  WEnd
	  Func $Hide
		  $Paused = Not $Paused
		  While $Hide()
		 GuiSetState(@sw_hide)
		 MsgBox(-1, "Gui State:", "GUI State:~> |-Hide-|")
                 WEnd		 
                 EndFunc
		 Func $UnHide()
			 $Paused = Not $Paused
			 While $UnHide
			GUISetState(@sw_show)
			MsgBox(-1, "Gui State:", "GUI State:~> |-Show-|")
	          WEnd
                  EndFunc
The error is:
Func $Hide
Badly formatted func statement
Can someone tell me what I did wrong? Q.Q
06/22/2012 16:43 K1ramoX#2
You do it so wrong...

Code:
HotKeySet("{F9}", "_Hide")
HotKeySet("{F10}", "_UnHide")

While 1
	Sleep(100)
WEnd

Func _Hide()
	GUISetState(@SW_HIDE)
	MsgBox(-1, "Gui State:", "GUI State:~> |-Hide-|")
EndFunc   ;==>_Hide

Func _UnHide()
	GUISetState(@SW_SHOW)
	MsgBox(-1, "Gui State:", "GUI State:~> |-Show-|")
EndFunc   ;==>_$UnHide
06/22/2012 16:53 Hybrid~#3
Quote:
Originally Posted by K1ramoX View Post
You do it so wrong...

Code:
HotKeySet("{F9}", "_Hide")
HotKeySet("{F10}", "_UnHide")

While 1
	Sleep(100)
WEnd

Func _Hide()
	GUISetState(@SW_HIDE)
	MsgBox(-1, "Gui State:", "GUI State:~> |-Hide-|")
EndFunc   ;==>_Hide

Func _UnHide()
	GUISetState(@SW_SHOW)
	MsgBox(-1, "Gui State:", "GUI State:~> |-Show-|")
EndFunc   ;==>_$UnHide
doh...forget that shitty _ xD | First time... I tried like u told me now... but still forgot the _ [Q.Q]
tyvm bro ... [<3]
Those HotKeySet was a pain in my ass all the time Q.Q



Edit2: This way it won't work
and This way it works,But the other buttons and function don't work [Q.Q]

I'm so nubish [Q.Q]