SRL Archive - RS3 Outdated / Broken Scripts

code for LoadPlayerArray please!


itSchRis917

2007-08-24 10:47:49

Well, i guess this is a request… I'm at school right now, and would like to look over that new snippet of code in SRL 4, called LoadPlayerArray. I cant download SRL 4, because i dont have WinRar, and the school's computers block all unverified programs from running. (im using shitty ie instead of firefox right now :( ) So, even if i did dl WinRar, i wouldn't be able to use it.. So, if you could get me the code for it, that would be great..

ZephyrsFury

2007-08-24 11:29:53

Shouldn't you be doing work at school…


{*******************************************************************************
procedure LoadPlayerArray;
By: Nielsie95
Description: Makes the Players array have Number indexes,
Call it AFTER you have declared your players..
*******************************************************************************}

procedure LoadPlayerArray;
var
i, c, l: Integer;
begin
if (GetArrayLength(Players) = 100) then
for i := 0 to 99 do
if Players[i].Name = '' then
begin
SetArrayLength(Players, i);
HowManyPlayers := i;
Break;
end
for c := 0 to HowManyPlayers -1 do
begin
l := GetArrayLength(Players[c].Integers);
if (l = 100) then
begin
for i := 0 to 99 do
if Players[c].Integers[i] = -1 then
begin
SetArrayLength(Players[c].Integers, i);
Break;
end;
end else
for i := 0 to l -1 do
if Players[c].Integers[i] = -1 then
Players[c].Integers[i] := 0;

l := GetArrayLength(Players[c].Strings);
if (l = 100) then
begin
for i := 0 to 99 do
if Players[c].Strings[i] = 'ØØØ' then
begin
SetArrayLength(Players[c].Strings, i);
Break;
end;
end else
for i := 0 to l -1 do
if Players[c].Strings[i] = 'ØØØ' then
Players[c].Strings[i] := '';

l := GetArrayLength(Players[c].Extendeds);
if (l = 100) then
begin
for i := 0 to 99 do
if Players[c].Extendeds[i] = -1.0 then
begin
SetArrayLength(Players[c].Extendeds, i);
Break;
end;
end else
for i := 0 to l -1 do
if Players[c].Extendeds[i] = -1.0 then
Players[c].Extendeds[i] := 0.0;

SetArrayLength(Players[c].Booleans, HowManyBooleans);
end;
end;


itSchRis917

2007-08-24 16:36:54

Its just my CAD class, its a blowoff class. Plus i have the software at home, so i work on it at home..

Edit: thanks btw :p