Couldn't parse

Need some help with that macro you're working on or aren't quite sure how to get your macro to do something? Ask here!

Moderator: MacroQuest Developers

Tangeleno
a hill giant
a hill giant
Posts: 193
Joined: Fri Feb 20, 2004 6:00 pm

Couldn't parse

Post by Tangeleno » Tue Apr 20, 2004 10:57 pm

Okies so I try to run a little canni mac I made and every time I run it it tells me
Couldn't Parse 'ar(mana,pct)'


Now I know the canni mac I have isn't as good as any of the others out there but its a start :) not too worried about cleaning it up as i would like to get it to work first :)

Code: Select all

Sub Event_Canni

  /if n $char(mana,pct)<=90
	{ /goto :dadance
                     } Else
	          { /echo mana is good 
		/call Main
		}


   :dadance
	
	/if n $char(hp,pct)>=50
		{
	/keypress sit_stand
		/delay 5
	/keypress cast6
		/delay 38
	/keypress sit_stand
		/delay 5
	/call Event_Canni
		} Else
		{ /goto :stoicism
		}

   :stoicism
	/keypress sit_stand
		/delay 5
	/keypress cast5
		/delay 6s
	/keypress sit_stand
		/delay 24s
	/call Event_Canni


Also it kept giving me an error about {} being on the same line when I had it going }Else{ is this normal or does MQ just not like me? And do I need the /call Main or does /return go back to the main sub? (I did read the manual!) Thank you all for any help you can give :) one day I might be able to make these!

magictiger
a snow griffon
a snow griffon
Posts: 450
Joined: Sun Mar 21, 2004 2:24 pm

Post by magictiger » Tue Apr 20, 2004 11:07 pm

/return takes you back to where the sub was called.
As far as your butterfly else, I think that's how it's supposed to work.
I forget the exact rule and I'm too damn lazy to find it for you, but I remember something about how } had to be the first character on the line and { had to be the last character on the line.

Now... if your'e using the latest version, there's no way in hell it's going to work unless you re-enable MQ2Params.
Which you shouldn't. Learn the new way instead. It is the way of the future.

Mister Peepers
a lesser mummy
a lesser mummy
Posts: 46
Joined: Mon Apr 19, 2004 8:10 pm

Re: Couldn't parse

Post by Mister Peepers » Tue Apr 20, 2004 11:17 pm

I think I converted it into the new MQData system correctly for ya. Let me know if it works I am kinda new to this.

I also removed the else statements. I don't think they work as well as another if statement.

[edit] fixed the case sensitive parts

Code: Select all

Sub Event_Canni

  /newif  ${Me.PctMana}<=90{
	 /goto :dadance}
                      
  /newif  ${Me.PctMana}>=90 {
	           /echo mana is good 
		/return}
		


   :dadance
	
	/newif  ${Me.pctHPs}>=50
		{
	/keypress sit_stand
		/delay 5
	/keypress cast6
		/delay 38
	/keypress sit_stand
		/delay 5
	/call Event_Canni
}
		
	/newif  ${Me.pctHPs}<=50{ /goto :stoicism
		}

   :stoicism
	/keypress sit_stand
		/delay 5
	/keypress cast5
		/delay 6s
	/keypress sit_stand
		/delay 24s
	/call Event_Canni
Last edited by Mister Peepers on Tue Apr 20, 2004 11:29 pm, edited 2 times in total.

LordGiddion
a snow griffon
a snow griffon
Posts: 352
Joined: Sat Sep 13, 2003 6:12 pm
Contact:

Post by LordGiddion » Tue Apr 20, 2004 11:21 pm

Mister Peepers your conversion won't work as is, hint MQ2Data is Case sensitive.

ml2517
a grimling bloodguard
a grimling bloodguard
Posts: 1216
Joined: Wed Nov 12, 2003 1:12 am

Post by ml2517 » Tue Apr 20, 2004 11:22 pm

Not to mention, take some F'ng time and spell shit correctly and don't add spaces etc.

Mister Peepers
a lesser mummy
a lesser mummy
Posts: 46
Joined: Mon Apr 19, 2004 8:10 pm

Post by Mister Peepers » Tue Apr 20, 2004 11:28 pm

Sorry, I didn't realize it was case sensitive but I canged it. As I said I am new to this, as you can see this is like my 5th or 6th post. Also I would like to point out I did not do anything wrong in my spelling. I only changed the /newif statements so I don't belive I did.

LordGiddion
a snow griffon
a snow griffon
Posts: 352
Joined: Sat Sep 13, 2003 6:12 pm
Contact:

Post by LordGiddion » Tue Apr 20, 2004 11:31 pm

Drop the n's in the /newif's, /newif is numeric by def.

Mister Peepers
a lesser mummy
a lesser mummy
Posts: 46
Joined: Mon Apr 19, 2004 8:10 pm

Post by Mister Peepers » Tue Apr 20, 2004 11:32 pm

I did, noticed them at the end when I was editing it.

Tangeleno
a hill giant
a hill giant
Posts: 193
Joined: Fri Feb 20, 2004 6:00 pm

Post by Tangeleno » Tue Apr 20, 2004 11:34 pm

Alright thank you all for responding and not flaming me :) But now I'm about ten shades of confused... /newif ?!?! wtf is this? Is it a completely different command from /if or do you all just use /newif to distinguish between the two?

Mister Peepers
a lesser mummy
a lesser mummy
Posts: 46
Joined: Mon Apr 19, 2004 8:10 pm

Post by Mister Peepers » Tue Apr 20, 2004 11:39 pm

the /if statement is used in the old $param system and /newif statement is used in the intergration of the MQData system in phase 2 but will be eventualy changed to /if when the final intergration is compleat in phase 4.

You should read about it in the annoncement forum.

Tangeleno
a hill giant
a hill giant
Posts: 193
Joined: Fri Feb 20, 2004 6:00 pm

Post by Tangeleno » Tue Apr 20, 2004 11:44 pm

heh doing so now I got a whole lotta reading to do :) *cries* And i thought i was gonna be able to make some macros soon

Lax
We're not worthy!
We're not worthy!
Posts: 3524
Joined: Thu Oct 17, 2002 1:01 pm
Location: ISBoxer
Contact:

Post by Lax » Wed Apr 21, 2004 12:23 am

/newif is taking over /if completely next zip
Lax Lacks
Master of MQ2 Disaster
Purveyor of premium, EULA-safe MMORPG Multiboxing Software
* Multiboxing with ISBoxer: Quick Start Video
* EQPlayNice, WinEQ 2.0

Tangeleno
a hill giant
a hill giant
Posts: 193
Joined: Fri Feb 20, 2004 6:00 pm

Post by Tangeleno » Wed Apr 21, 2004 12:45 am

Okies, thank you for the info Lax :)