SRL Archive - OSR Help

Array help


Mr. Doctor

2010-02-01 06:45:55

I'm calling an array from declare players, but I don't know how to set it's values.
Like a normal array, you would do

AArray[0] := X;
AArray[1] := Y;
It looks funky because,

Players[CurrentPlayer].Arrays[0] := ? //WTF?

Any ideas?

senrath

2010-02-01 06:51:07

Players.Arrays are used to store arrays. So you'd use them like this:


var
AArray: Array of Whatever;

...

Players[CurrentPlayer].Arrays[0] := AArray;

Mr. Doctor

2010-02-01 06:53:31

Figured that. Thanks senrath.

Bionicle

2010-02-01 17:06:44

Players[CurrentPlayer].Arrays[0] := [X, Y];

This what you mean?