A Statment doesn't execute
Sensiva
Posts: 211
DEFINE_CALL 'MARANTZON' { IF(!DVDPWR) { ON[DVDPWR] DVDACTIVE = DVDPWR [color=red][B]//this one isn't executed... why??[/B][/color] PULSE[DVD_MARANTZ,DVDPower] CALL 'TACTON' CALL 'TACT_MARANTZ' CALL 'PLASMAON' CALL 'PLASMA_MARANTZ' } }
both DVDACTIVE and DVDPWR are integers
Thanks
0
Comments
This code compiled to NetLinx works fine for me:
You did the same thing, except i call this routine in button_events, so... why??
Well, I tried what you said before posting this thread... but no use, actually DVDPWR is fine but I have noticed that DVDPWR is the only variable that responds in this routine, I have tried to handle DVDACTIVE in another call but no use too, Now I did what I need to keep tracking of the DVD activities, but the question is WHY??... is it somthing in the compiler, or some rule I should follow while I am inside the routine?
You might check the other calls you have in the function. Perhaps you're resetting DVDPWR in them by mistake. Or, somewhere else in the program you're resetting the variable... Just a thought.
happy debugging!
a Steven Wright-ism paraphrased into programming-speak, "Do you ever notice that the mistake you made in the program is always in the last place you look to find it?"
Well, this probably isn't it, but it's worth a mention. I just added an integer called goofy1 under DEFINE VARIABLE in one of my .axs files and also as a local integer within the push: of a button event in the same file. Compiles without error or warning.
So is it possible you have done something like this , and are setting the global but checking the local?
just a thought...
Bob Moyle
these two varibales are global variables.. defined in the define_variable section, and for the idea of resetting them again by mistake , this is not true for three reasons
1- if it is reset by mistake, i would see it in the watch window.
2- this variable isn't included in any other calls
3- i defined another variable called deb_var to replace the DVDACTIVE.. but its still there.
may be it is because the INTEGER Keyword??