Sry about the vague title, couldn't think of a good title that would explain what I need help with.
I want the variable make[0] to hold 2 strings. the first sting is what to make the second is the amount to make. make[1] would hold another 2 strings of the same type, etc. I then would be able to call the variable make[0].potion or make[0].amount to get the different stings from each array. I am not sure on how exactly to set this up. here is what I have come up with so far.
This should print out:
Super Attack
Super Strength
Super Defence
Attack
Simba Code:program New;
{$i srl/srl.scar}
procedure What_to_Make;
var
//don't know how to do this
Make: TStringArray;
begin
SetArrayLength(Make, 2);
//Fill in what to make
//Make[i].potion Make[i].amount
Make[0] := ('Super Attack', '100');
Make[1] := ('Super Strength', '100');
Make[2] := ('Super Defence', '100');
Make[3] := ('Attack', '100');
end;
Begin
SetupSRL();
for i := 0 to High(Make) do
begin
Writeln(Make[i].potion)
End.



Reply With Quote











