Possible Unit Comparison bug?
|
01-09-2014, 02:12 AM
Post: #1
|
|||
|
|||
Possible Unit Comparison bug?
Hey, I was trying to figure out how to program a key to behave differently with a short press and a long press, and came across something that I suspect is a bug.
Code: KEY K_7() Simple as that is, it simply would not work until I did this: Code: time:=TIME(KeyTimer(32))/1_s; This despite the fact that comparatives seem to work just fine on units in the Home screen. Is this a bug, or do I need to do something to prep the unit object in the first bit of code? Also, not a bug but something worth knowing: I originally tried to use GETKEY in place of the key number of 32, but it didn't work. The KEY function must use GETKEY to return the key number, so when you do it again you get -1. P.S. I eventually redid the whole thing using TICKS rather than TIME, but I still think the potential bug is worth mentioning. |
|||
01-09-2014, 03:37 PM
Post: #2
|
|||
|
|||
RE: Possible Unit Comparison bug?
Thanks. I'm not sure either, but I've marked it down for examination.
TW Although I work for HP, the views and opinions I post here are my own. |
|||
« Next Oldest | Next Newest »
|
User(s) browsing this thread: 1 Guest(s)