Jump to content
Sign in to follow this  
kcd-clan

Whats wroung with this

Recommended Posts

kcd-clan

$d2loader=0

If WinExists("SwgClient") Then ;norm diablo

$d2loader=1

Else

If NOT WinExists("SwgClient") Then ;d2loader

MsgBox(48, "", "Could not find SwgClient")

Exit

Endif

Endif

WinActivate("SwgClient")

WinWaitActive("SwgClient")

Sleep(2000)

I complie it and says

Error: "If" statment with no matching "endif" stament


Visit mEMy programs made.Iul - IulG-V Console - G-V Console_RandomLetter - _RandomLetter()Saftey Kill - Saftey Killcolorzone() = colorzone()

Share this post


Link to post
Share on other sites
buzz44

Works fine for me. 3.1.1.24. Could change the code abit to.

$d2loader = 0
If WinExists("SwgClient") Then
   $d2loader = 1
Else
   MsgBox(48, "", "Could not find SwgClient")
   Exit
EndIf
WinActivate("SwgClient")
WinWaitActive("SwgClient")
Sleep(2000)

The If statement inside the other one isn't nessicary because obviously the window is going to be one of 2 things, there or not. What did you use to compile it?

Edited by Burrup

qq

Share this post


Link to post
Share on other sites
buzz44

I think you should look in the help file for If...ElseIf..Else...EndIf Statments.

Edited by Burrup

qq

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  

×