Results 1 to 3 of 3

Thread: code for LoadPlayerArray please!

  1. #1
    Join Date
    Jan 2007
    Location
    Illinois.. >.<
    Posts
    1,158
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default code for LoadPlayerArray please!

    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..

  2. #2
    Join Date
    Apr 2007
    Location
    Perth, Australia
    Posts
    3,926
    Mentioned
    3 Post(s)
    Quoted
    2 Post(s)

    Default

    Shouldn't you be doing work at school...

    SCAR Code:
    {*******************************************************************************
    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;

  3. #3
    Join Date
    Jan 2007
    Location
    Illinois.. >.<
    Posts
    1,158
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    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

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. How do you code?
    By Wrycu in forum C/C++ Help and Tutorials
    Replies: 17
    Last Post: 10-27-2008, 02:10 PM
  2. What is the code...
    By Boonce in forum OSR Help
    Replies: 13
    Last Post: 01-13-2008, 01:38 PM
  3. Code Box
    By Bam Bam in forum News and General
    Replies: 2
    Last Post: 08-15-2006, 10:45 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •