![]() ![]() |
Jan 11 2004, 12:57 AM
Post
#1
|
|
![]() Cool Newbie ![]() ![]() Group: Members Posts: 42 Joined: 20-July 03 From: O'Fallon, MO Member No.: 1,199 |
OK I finally broke down and wrote my first macro using Datasets. And After beating my head agsinst the wall for hours on end I finally got it working, but I was wondering if there is any good write-ups out there that Show all Fields and TYPEs that are predefined.
i.e LoadDecalWorldEx TYPE, 24 //For PLayers Just wondering where to look to find all the types or how to figure out what they are. Thanks in advance for all your help and suggestions. |
|
|
|
Jan 11 2004, 01:26 AM
Post
#2
|
|
![]() Lord of the Forums ![]() ![]() ![]() ![]() ![]() ![]() ![]() Group: Members Posts: 1,801 Joined: 15-April 03 From: London, Ontario, Canada Member No.: 14 |
Try these:
[1]Dataset Types [2]Question on Datasets [3]DSInventory Item "Types"?? [4]Global Forum Search on "LoadDecal*" For most of the LoadDecalX commands, and the structure of their related datasets, look in the ACTools help, and/or the ReadMe file. -Triane -------------------- SQL>SELECT * FROM users WHERE clue > 0;
0 rows returned SQL>_ |
|
|
|
Jan 11 2004, 11:33 AM
Post
#3
|
|||
![]() Cool Newbie ![]() ![]() Group: Members Posts: 42 Joined: 20-July 03 From: O'Fallon, MO Member No.: 1,199 |
OK lets see if I finally am getting somewhere. So basically the best way to find out would be to write a macro like this? Corret or Not ? Basically am I on the right track?
|
||
|
|
|||
Jan 11 2004, 12:02 PM
Post
#4
|
|||||
![]() Lord of the Forums ![]() ![]() ![]() ![]() ![]() ![]() ![]() Group: Members Posts: 1,801 Joined: 15-April 03 From: London, Ontario, Canada Member No.: 14 |
These are fine, but I'm not quite sure why you defined the three datasets "WorldTest", "InventoryTest" and "MonarchTest"? Presuming there's a reason outside the scope of this code sample, there are some things to point out: (1) ACTools automatically predefines specific datasets for you. In this case the ones you're interested in are "DSWorld", "DSInventory" and "DSMonarch". There are others as well, but as you're not referencing them, I won't either. I point this out because, unless there is another specific reason for duplicating the internal datasets, you don't need to do so: you can work straight from the internal sets directly. I'm not saying that there's no reason to duplicate them, there are several good reasons, one of which is discussed at length here but if you're doing it simply for dereferncing the data, it's an unnecessary step. (2) Calling one of the "LoadDecalX" commands populates the relevant internal dataset with the relevant information, gleaned from Decal. These datasets are NOT updated in real-time. They are ONLY populated when the relevant "LoadDecalX command is called. In this case, all previous data in the set is erased and new data repopulates the set. (3) You dereference/utilise these datasets exactly the same way as any other dataset you've created, with all the same commands and methodologies. (4) It looks as though you're manually copying the contents of the internal datasets to a backup dataset, you should look up "DSCopy" in relation to this process. Taking these things into account, your code sample could be rewritten like so:
That snippet would perform the exact same function as the one you wrote, but (obviously) in a lot fewer lines. Remember: when you load a dataset (via DSLoad or by DSCopying) the target dataset's fields and contents are OVERWRITTEN by that of the source dataset. That's why it doesn't matter how we define the fields of WorldTest, MonarchTest and InventoryTest. Does that help any? -Triane -------------------- SQL>SELECT * FROM users WHERE clue > 0;
0 rows returned SQL>_ |
||||
|
|
|||||
Jan 11 2004, 02:14 PM
Post
#5
|
|
![]() Cool Newbie ![]() ![]() Group: Members Posts: 42 Joined: 20-July 03 From: O'Fallon, MO Member No.: 1,199 |
I think I can finally see the light now thanks
|
|
|
|
Jan 11 2004, 10:01 PM
Post
#6
|
|
![]() Lord of the Forums ![]() ![]() ![]() ![]() ![]() ![]() ![]() Group: Members Posts: 1,801 Joined: 15-April 03 From: London, Ontario, Canada Member No.: 14 |
No problem! Happy to help
-Triane -------------------- SQL>SELECT * FROM users WHERE clue > 0;
0 rows returned SQL>_ |
|
|
|
![]() ![]() |
| Lo-Fi Version | Time is now: 3rd September 2010 - 07:28 AM |