NewToAutoing
06-02-2007, 08:38 AM
I feel stupid making another thread in this same forum, but i'm getting problems with CountItemDTM...I used it to count a DTM of an ore, and the DTM works fine for everything else (banking, etc) but it gives me the wrong number everytime. To test it out i did this:
procedure SetUpScript;
begin
SetUpSRL;
SetupSRLMining;
DeclarePlayers;
LoadImages;
end;
begin
SetUpScript;
Oresmined := CountItemDTM(OreDTM);
Writeln(IntToStr(OresMined));
FreeImages;
end.
And the DTM is declared in the LoadImages procedure, anyway i tried it multiple times with the above, first i tried it with five iron ores in my inventory, and in the debug log i got 3, and i tried it again with another DTM (that of a gem) and the ores at the same time, and it got the right number for the gems (6 in my inventory at the time, it came up 6) but the wrong number for the ores again..Any idea why? (I apologize in advance if it's something really obvious that i'm missing as it's late and i'm tired :p)
procedure SetUpScript;
begin
SetUpSRL;
SetupSRLMining;
DeclarePlayers;
LoadImages;
end;
begin
SetUpScript;
Oresmined := CountItemDTM(OreDTM);
Writeln(IntToStr(OresMined));
FreeImages;
end.
And the DTM is declared in the LoadImages procedure, anyway i tried it multiple times with the above, first i tried it with five iron ores in my inventory, and in the debug log i got 3, and i tried it again with another DTM (that of a gem) and the ores at the same time, and it got the right number for the gems (6 in my inventory at the time, it came up 6) but the wrong number for the ores again..Any idea why? (I apologize in advance if it's something really obvious that i'm missing as it's late and i'm tired :p)