Passing Pointers

Just starting out? Need help? Post your questions and find answers here.
User avatar
Demivec
Addict
Addict
Posts: 4091
Joined: Mon Jul 25, 2005 3:51 pm
Location: Utah, USA

Re: Passing Pointers

Post by Demivec »

GenRabbit wrote:But shouldn't this;
PokeL(?SkillStructRQ3, (?SkillStructEnd-?SkillStructRQ3) / #RQ3Header_Skill) ;record count of skill records
Be;
PokeI(?SkillStructRQ3, (?SkillStructEnd-?SkillStructRQ3) / #RQ3Header_Skill) ;record count of skill records

Poke Integer, not Poke Long.
Your observation is correct, I made a typo :oops: . I've added the correction to the previous code.
GenRabbit
Enthusiast
Enthusiast
Posts: 118
Joined: Wed Dec 31, 2014 5:41 pm

Re: Passing Pointers

Post by GenRabbit »

Oki, this is not a post to ask a question, but to Praise the defskill Macro, to me it just wen't from great to friggin awesome. Why do you ask?
I'm programming on this project which require a server/client thingy. And I have a macro which with everything is like 6 post wide.

Now, I needed stuff from list in both server and client. But only some of it.
Client needed post 1,2,3 and 6
Post needed post 1,4,5
There where multiple ways to solve it. I could build two files using the macro and then adding the 4 post for client in one file, 3 post for server in another file.
The irritation is that the larger these files grew, the more likely it was something went out of sync and would create a mess.

Offcourse I could also just add same file to both server and client. But then both Server and client would have data it didn't need.

The solution which skyrocked my joy over this macro was when I found out this;
Create one file used by both with the datasection, but make changes to the macro.

Example
Macro Client

Code: Select all

Macro DefSkill(post1, post2, post3, post4, post5, post6)
    Data.w post1
    Data.w post2
    Data.w post3
;    Data.w post4
;    Data.w post5
    Data.w post6
EndMacro


Macro Server

Code: Select all

Macro DefSkill(post1, post2, post3, post4, post5, post6)
    Data.w post1
;    Data.w post2
;    Data.w post3
    Data.w post4
    Data.w post5
;    Data.w post6
EndMacro
The finished code does not seem to have these post which is Rem'ed out... And that I found friggin awesome. :)
Post Reply