Search found 4 matches

by Steveiwonder
Mon May 25, 2015 5:58 am
Forum: MQ2::Macros::Help
Topic: Passing argument type to subroutrine
Replies: 8
Views: 1472

Re: Passing argument type to subroutrine

I can write little plugin snippet to create what you are asking for in the form of a /command. However, there is probably a better way to incorporate it actually working. What needs to happen is a way to directly access GetSpawnByName() and GetSpawnByID(). a la: /declare MySpawn1 spawn GetSpawnByID...
by Steveiwonder
Mon May 25, 2015 3:56 am
Forum: MQ2::Macros::Help
Topic: Passing argument type to subroutrine
Replies: 8
Views: 1472

Re: Passing argument type to subroutrine

The macro above was just an example, I'm trying to do something slightly different but i get i can just use a var which is fine and i will do.

Thank you anyway, worth knowing if this could be done.
by Steveiwonder
Mon May 25, 2015 3:09 am
Forum: MQ2::Macros::Help
Topic: Passing argument type to subroutrine
Replies: 8
Views: 1472

Re: Passing argument type to subroutrine

Thanks for the replies. I have tried it like this however it doesn't work, but the result is different. Instead of it throwing an error like cannot find member 'ID', the echo actually outputs 0. So it must have passed a type of some kind. I tried echoing more properties on the 'obj' and the values o...
by Steveiwonder
Sun May 24, 2015 6:15 pm
Forum: MQ2::Macros::Help
Topic: Passing argument type to subroutrine
Replies: 8
Views: 1472

Passing argument type to subroutrine

Hiya, I'm having some problems passing particular object types to subroutines. I've got the following Sub Test(obj) /echo ${obj.ID} /return I'm basically trying to pass a "spawn" to the routine but i think tostring is being called on the object before it gets passed in. I looked a the docu...