ok so i need to count my items in my invent easy well so i thought
im using the following but cant seam to make it work..
Simba Code:
program count;
var
objDTM : Integer;
Procedure LoadDMTZ;
begin
objDTM := DTMFromString('blabla');
end;
procedure CheckInv(Check: String);
var
y :Integer;
begin
y := CountItems('dtm', objDTM, [0]); // dtm stored in the main var
case Lowercase(Check) of
'objcount':
if (y<20) then
begin
Writeln('!FailSafe! - obj Inbalance');
Writeln('obj found :' + IntToStr(y) ); // alwase returns 0 even when there is 20 in my invent
DepositAll;
end;
else
Writeln('selection error!');
end;
end;
begin
setup;
LoadDMTZ;
CheckInv('objcount')
otherstuff;
end.
i want it to get the object from the bank count how many it has in invent of the object then if there is not any banking has faild so do it again if there is carry but it just will not count keeps returning 0 but cant see why oh and the banking screen is open but i cant see this effecting it...
thanks for help in advanced