Results 1 to 6 of 6

Thread: semicolon/identifier errors

  1. #1
    Join Date
    Jun 2007
    Posts
    44
    Mentioned
    0 Post(s)
    Quoted
    6 Post(s)

    Default semicolon/identifier errors

    Compiler Error Line 6, Semicolon expected

    (line 4)If (GetColor(432,347) = 254) Then
    (line 5)ClickMouse(952, 91, True) Else
    (line 6)ClickMouse(432, 347, True) Then

  2. #2
    Join Date
    Jun 2007
    Posts
    44
    Mentioned
    0 Post(s)
    Quoted
    6 Post(s)

    Default

    i put the semicolon, now its an identifier error

  3. #3
    Join Date
    Jun 2007
    Location
    Wednesday
    Posts
    2,446
    Mentioned
    3 Post(s)
    Quoted
    1 Post(s)

    Default

    You posted in the very wrong section and you double-posted as well, which is wrong in nearly all cases. In the future, please use the Scripting Help forum or something that has scripting and help mentioned somewhere in it and use the Edit button rather than making two posts in a row.

    Your error is because you have "ClickMouse() then" when you don't need a then, just a semi-colon.
    By reading this signature you agree that mixster is superior to you in each and every way except the bad ways but including the really bad ways.

  4. #4
    Join Date
    Dec 2011
    Location
    New York, USA
    Posts
    1,242
    Mentioned
    12 Post(s)
    Quoted
    193 Post(s)

    Default

    Either delete the then or add an if to the second error.

  5. #5
    Join Date
    Jun 2007
    Location
    Wednesday
    Posts
    2,446
    Mentioned
    3 Post(s)
    Quoted
    1 Post(s)

    Default

    ClickMouse isn't a function that returns a Boolean function, so you can't use it as the "argument" for an if...then
    By reading this signature you agree that mixster is superior to you in each and every way except the bad ways but including the really bad ways.

  6. #6
    Join Date
    Oct 2011
    Location
    UK
    Posts
    1,322
    Mentioned
    2 Post(s)
    Quoted
    1 Post(s)

    Default

    Simba Code:
    If (GetColor(432, 347) = 254) Then    //if the colour at point 432, 347 is 254 then
        ClickMouse(952, 91, True)          //do this
      Else                                            //otherwise
        ClickMouse(432, 347, True);           //do this
      //Rest of script goes here...

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •