Converision Question - Sorry

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

Batman
orc pawn
orc pawn
Posts: 16
Joined: Fri Feb 06, 2004 1:52 am

Converision Question - Sorry

Post by Batman » Wed Apr 28, 2004 3:38 pm

Code: Select all

/if $defined(Param0)==false /endmacro
/if (${defined([Param0]})==false) /endmacro 

Code: Select all

/if n @SingTime<=0 /call Sing @SongArray(@cursong)
/if n (${@SingTime<=0}) /call Sing @SongArray(@cursong)

Code: Select all

/if n @cursong>@nsongs /varset cursong 1
/if (${@cursong>@nsongs}) /varset cursong 1
If anyone has a minute and could tell me where I messed up at it would be appreciated! I tried using the other examples and guides but still getting errors =/

s16z
a ghoul
a ghoul
Posts: 97
Joined: Thu Apr 01, 2004 12:03 pm

Post by s16z » Wed Apr 28, 2004 3:45 pm

Code: Select all

/if (!${Defined[Param0]}) /endmacro

/if (${SingTime}<=0) /call Sing @SongArray[@cursong]

/if (${cursong}>${nsongs}) /varset cursong 1

Batman
orc pawn
orc pawn
Posts: 16
Joined: Fri Feb 06, 2004 1:52 am

Post by Batman » Wed Apr 28, 2004 4:33 pm

Thanks! Find another one it doesn't like:

Code: Select all

/for I 1 to @nsongs 
      /varcalc J $int(@I-1) 
      /varset SongArray(@I) $mid(@J,1,@SongList) 
|      /echo Song @I: $char(gem,@SongArray(@I)) 
   /next I 

I'm looking at this but can't make sense how to convert it.
/varcalc
Usage: /varcalc <varname> <formula>
Sets a variable directly to the numeric result of a calculation. Keep in mind that the type
itself may reject this value depending on what you give it. This will NOT work on strings!

Example usage:
/varcalc MyInt 1+2*2+1
/varcalc MyInt 1+(2*2)+1

Batman
orc pawn
orc pawn
Posts: 16
Joined: Fri Feb 06, 2004 1:52 am

Post by Batman » Wed Apr 28, 2004 9:02 pm

Anyone have an idea? Would be greatly appreciated so I could start playing EQ again heh =)

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

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

I think the /varcalc part should be

Code: Select all

 /varcalc J @I-1
I think that is how it works but I am not 100% sure on this. Mabey someone with more know how can post on this.

dok
a ghoul
a ghoul
Posts: 127
Joined: Mon Mar 15, 2004 3:38 pm

Post by dok » Thu Apr 29, 2004 12:03 am

well, the mid part converts to w/o using MQ2Vars:

/varset SongArray(@I) ${String[@J].Mid[1,@SongList]}

As for if you get the result you wanted or not, no clue what @J and @SongList are, so you might have to adust it some.

Btw, you should start converting your scripts to the MQ2DataVars while you're rewriting it anyway...