{ } info (unsure if it's a bug)

A forum for the general posts relating to MacroQuest. *DEPRECATED: This forum is no longer in public use, but remains here for your reading pleasure. Enjoy

Moderator: MacroQuest Developers

Amadeus
The Maestro
The Maestro
Posts: 2036
Joined: Sat Jun 29, 2002 3:51 pm

{ } info (unsure if it's a bug)

Post by Amadeus » Sun Jul 07, 2002 10:38 pm

I'm unsure if this was intended or not; however...

This code gives a parse error and will not execute:

Code: Select all

      /if "$cursor(name)"=="Plains Pebble" 
         {
            /click left auto
            /delay 1
            /call SpellSub 6 7
            /delay 1
            /click left auto
         }
However, this code seems to work just fine:

Code: Select all

      /if "$cursor(name)"=="Plains Pebble" {
          /click left auto
          /delay 1
          /call SpellSub 6 7
          /delay 1
          /click left auto
      }

User avatar
L124RD
Site Admin
Site Admin
Posts: 1343
Joined: Fri Jun 14, 2002 12:15 am
Location: Cyberspace
Contact:

Post by L124RD » Sun Jul 07, 2002 10:45 pm

Salutations,
readme wrote:Command can be { which will run everything up to the next }
Last edited by L124RD on Sun Jul 07, 2002 10:56 pm, edited 1 time in total.

Amadeus
The Maestro
The Maestro
Posts: 2036
Joined: Sat Jun 29, 2002 3:51 pm

Post by Amadeus » Sun Jul 07, 2002 10:53 pm

Ok, I had to read that a few times to see that in the readme, he was equating { to a / command. Therefore, then, the bracket has to come exactly one space after the /if statement.

I just saw the { } implementation and was off and running with my old C/C++ habits!! :P :oops:

User avatar
L124RD
Site Admin
Site Admin
Posts: 1343
Joined: Fri Jun 14, 2002 12:15 am
Location: Cyberspace
Contact:

Post by L124RD » Sun Jul 07, 2002 10:55 pm

Salutations,
same...