Jump to content

Lame error


Recommended Posts

Hi, fellows!

I've encountered a very strange error.

***.au3 (406) : ==> "If" statements must have a "Then" keyword.: 
If $lg[$ni] == $id Then 
If $lg^ ERROR

The program compiles successfully and it runs to the point where I get this error. My "If" statement has a "Then". I've been staring at my code for a half-hour and I can't see what's wrong. Probably it is something very easy that I don't see so please tell me >_<

Thank you

I ran. I ran until my muscles burned and my veins pumped battery acid. Then I ran some more.

Link to comment
Share on other sites

Can you post the entire code?

For $ni = 1 To $bu
  If $lg[$ni] == $id Then
    $fl = 1
    ExitLoop
  EndIf
Next

The entire code is very very long and I think the other part of the code is irrelevant to the problem

Edited by muhmuuh

I ran. I ran until my muscles burned and my veins pumped battery acid. Then I ran some more.

Link to comment
Share on other sites

It's possible you have a bad character code in the line. Try deleting the whole line and typing it back out to make sure there isn't an invisible character in the way.

already done that too >_<

but it still doesn't work

I ran. I ran until my muscles burned and my veins pumped battery acid. Then I ran some more.

Link to comment
Share on other sites

what is inside the following variables?

$bu $lg $id

$bu and $id are integers

$lg is an array of itnegers

Edited by muhmuuh

I ran. I ran until my muscles burned and my veins pumped battery acid. Then I ran some more.

Link to comment
Share on other sites

I found out the problem

I found out that I use another variable $lg :( of type object

Changed the variable name and it works now

Thank for all responses and thanks for the "=" tip, Richard Robertson

Lame error by a lame coder :(

In my defense the error from the compiler didn't help me a lot >_<

Edited by muhmuuh

I ran. I ran until my muscles burned and my veins pumped battery acid. Then I ran some more.

Link to comment
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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...