As some of you may know, my current project is a flipping script. It's coming along nicely, but I have a few minor hiccups. I need help with the following 'problem'.
I have some records within my script. One of them is:
Simba Code:
type ItemData = record
ItemName: String;
BuyTime: Integer;
Amount: Integer;
BuyPrice: Integer;
SellPrice: Integer;
BuyBox: Integer;
end;
Next I have the a variable for that type:
Simba Code:
ItemArray: array of Itemdata := [...];
Now I want to create a few functions for the 'ItemArray'. For example I would like create something like this:
Simba Code:
procedure ItemArray.deleteIndex(const index : Integer);
But if I make a function like that I get the following error:
Code:
Error: Parent declaration is out of scope
I was going trough the srl library, because this is also done with 'TIntegerArray' (and more). Writing the procedure isn't the problem (just stealing it from Zyt3x, from the TIntegerArray library). But I can't find how to make a procedure from an array (like 'ItemArray.deleteIndex'). I know how to make the procedure from just a So how could I create those procedures?
I hope my question is clear enough.
Thanks in advance!