Error: invalid operator - what does it mean?

  • Hi again!

    I've encountered this error today using Bing Maps, but I suspect this error occurs somewhere inside if(); check..hmmm... soo...

    I have this code of the mapspots' overevent inside "addmapspots" action:

    Code
    txtadd(spotoverevent, 'set(hovering, true);show_tooltip(', get(scene[get(i)].title),');');

    the overevent takes the scene's title and passes it to "show_tooltip();" action which uses parameter as tooltip's html. Like this:

    Code
    ifnot(%1 ==  null,
     	set(layer[tooltip].html, %1););

    But when I hover the mapspots I got two errors:

    1) "ERROR: Invalid operator : BEACH" when I hover spot leading to scene called "The beach".
    2) "ERROR: Invalid operator : "AT" when I hover spot leading to scene called "Spa at day".

    (Obviously both "at" and "beach" are part of the scene titles).

    More strange is that the third spot called "Lobby" doesn't show this error.

    A bit complex, yep, and I've never encountered such an error before, so for the start I wonder what does it mean?

  • Hi,

    the reason here is the %1 is just a 'placeholder' for the parameter - the parameter will be 'pasted' in there - and when the value for %1 contains spaces the if() check will not work without quote characters to escape them.

    Try it this way:

    Code
    ifnot('%1' ==  null, ...

    Best regards,
    Klaus

Jetzt mitmachen!

Sie haben noch kein Benutzerkonto auf unserer Seite? Registrieren Sie sich kostenlos und nehmen Sie an unserer Community teil!