Sie sind nicht angemeldet.

Douglas Rhiner

Fortgeschrittener

  • »Douglas Rhiner« ist der Autor dieses Themas

Beiträge: 141

Wohnort: San Anselmo, CA

Beruf: Code-Slave

  • Nachricht senden

1

Freitag, 9. Dezember 2011, 00:18

Actions and "if" syntax

I'm having trouble with "if" statements....

Below I have two actions, one calling the other after 2 seconds.
All seems to work fine except for the "if" statement.
I can trace-out "transtime" and "mytime" at-will in either action.
But I can't get the "if" statement to work.
Meaning "what the heck...." never traces out.


<action name="gettranstime">
showlog(true);
set(mytime,get(plugin[trans].totaltime));
trace('Original time=',get(mytime));
sub(mytime, 2);
trace('TwoSec time=',get(mytime));
delayedcall(2.0, checktranstime() );
</action>

<action name="checktranstime">
set(transtime,get(plugin[trans].time));
if(transtime >= mytime,
trace('what the heck....');
);
trace('Trans Time....',plugin[trans].time);
trace('My Time=',get(mytime));
delayedcall(0.1, checktranstime() );
</action>


Anyone with a fresh pair of eyes see what I'm screwing up? *wacko*

Beiträge: 1 857

Beruf: Virtual Tours - Photography - Krpano developer

  • Nachricht senden

2

Freitag, 9. Dezember 2011, 04:59

U try GE instead of >= ?
KRPano Developer: Portfolio ::Gigapixel Tagging Solutions - Porfolio 2 :: Facebook :: Twitter :: reddit.com/r/VirtualTour

Zephyr

Profi

Beiträge: 1 003

Wohnort: Netherlands

Beruf: Web developer

  • Nachricht senden

3

Freitag, 9. Dezember 2011, 13:58

yes > can't be used in xml documents, so Klaus made them GT LT GE LE EQ == != === !== (not sure about the last one)