Mailing List Archive: 49091 messages
  • Home
  • Script library
  • AltME Archive
  • Mailing list
  • Articles Index
  • Site search
 

Comparing pairs

 [1/3] from: dada:gecko:verizon at: 23-Jun-2002 20:22


I read the archives, and the article from Gregg (nice :) ). And just have one point of clarification. I need to determine if the current coordinate of an element is at the same coordinate as another element on the screen. What I have for code is this: ; start code here ... if [hero/offset == treasure/offset] [ alert "You found the treasure!" ] ... ; end code here of course it alerts after every move because i'm comparing datatypes and not values. Any hints? I'm feeling pretty dumb :\ sd -- --------------------------------- : sabin densmore : www.onegecko.com : [sabin--onegecko--com]

 [2/3] from: dada:gecko:verizon at: 23-Jun-2002 20:53


From the manual: Do not enclose conditional expressions in a block. Conditional expressions enclosed in blocks, always return a true result: if [false] [print "yep"] yep so, if I do this: if hero/offset == treasure/offset [ alert "You found the treasure!" show treasure ] everything works fine. :) sd Sabin Densmore wrote:
> I read the archives, and the article from Gregg (nice :) ). And just > have one point of clarification.
<<quoted lines omitted: 12>>
> Any hints? I'm feeling pretty dumb :\ > sd
-- --------------------------------- : sabin densmore : www.onegecko.com : [sabin--onegecko--com]

 [3/3] from: al::bri::xtra::co::nz at: 24-Jun-2002 15:33


sd wrote:
> if hero/offset == treasure/offset [
Try just a single "=" equals sign instead. Andrew Martin ICQ: 26227169 http://valley.150m.com/

Notes
  • Quoted lines have been omitted from some messages.
    View the message alone to see the lines that have been omitted