Learn how easy it is to sync an existing GitHub or Google Code repo to a SourceForge project! See Demo

Close

if / else if / else structures showing syntax

Help
2012-04-17
2013-02-18
  • Leah Klearman
    Leah Klearman
    2012-04-17

    Hi,

    I'm trying to use if / else if / else statements as described http://www.t-plan.com/robot/docs/v2.0/scripting/commref.html#if but the syntax checker keeps saying it's wrong. I've put in conditional expressions that should not have any doubt of their validity. In the following example the underlines should indicate red underlines of he syntax checker.

    t_if (1 > 0) {
      Mouse move to=x:87,y:979 wait=200
    } else if (0 > -1) {
      Mouse move to=x:87,y:979 wait=200
    } else {
      Mouse move to=x:87,y:979 wait=200
    }_

    The if line does not give me any tooltip.
    The else if line gives me a tooltip that says "unknown code after '}'".
    The else line gives me a tooltip "incorrectly terminated end of a block - '}' expected".
    The close block line also gives me "incorrectly terminated end of a block - '}' expected"

    Hopefully someone can shed some light…
    Thanks,
    -Leah

     
  • Robert Pes
    Robert Pes
    2012-04-18

    This is a known issue in 2.0.6 which has been discussed in the If statement regressed in 2.0.6 forum topic. Please upgrade to 2.0.7 or downgrade to 2.0.5.