Using get() in If condition

  • Hi all

    I have a Problem with an If condition.
    With an onclick action i create a variable and inc the value for it.

    Code
    inc(get(hotspot[get(actualspot)].id));

    This will set a new variable and set it to 1. The variable is called "i1" in this case.

    Now i want to check in an if condition if the value is GT 0.
    I tried as followed:

    Code
    if(get(hotspot[get(actualspot)].id) GT 0,	trueaction();	,	falseaction(););


    I always get false for that even if it should be true.
    But when i trace the value stored in that

    Code
    get(hotspot[get(actualspot)].id)

    i get out t a number. But is the condition not working?
    When i set the static variable to the condition

    Code
    i1

    instead of

    Code
    get(hotspot[get(actualspot)].id)

    it works.


    Is there a Syntax mistake on my side?


    Thanks
    Sven

  • thanks

    I figured it out somewhen by myself. But then had a strange new error.
    The value stored in actualspot was a special id i gave for several hotspots.
    It was only one letter and then an increasing number. a.ex. a1

    when tracing this variable, i always got 0 instead of a1.
    Seems like there is a minimum of digits that you have to use?

    Sven

Participate now!

Don’t have an account yet? Register yourself now and be a part of our community!