Results 1 to 4 of 4

Thread: array of player help

  1. #1
    Join Date
    Jul 2006
    Posts
    259
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default array of player help

    it says i need to end this with a period but that will end the rest of the code and i don't know what else to do i looked a like 3 tut and i cant find out whats wrong
    SCAR Code:
    type
      player = record
        name : string;
        pass : string;
    end;
    var
    current_player: array [0..1] of player;

    begin
    current_player[0].name:='players name';
    current_player[0].pass:='players password';

    current_player[1].name:='players name';
    current_player[1].pass:='players password';
    end;
    //continuous code not important

  2. #2
    Join Date
    Feb 2007
    Location
    USA
    Posts
    667
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Are you trying to make your own? Becuase you can just use the template SRL provides otherwise.

    SCAR Code:
    procedure DeclarePlayers;
    begin
         HowManyPlayers := 2;
         CurrentPlayer := 0;
         NumberOfPlayers(HowManyPlayers); // set arraylength

         Players[0].Name :='';
         Players[0].Pass :='';
       

         Players[1].Name :='';
         Players[1].Pass :='';
    end;

  3. #3
    Join Date
    Jul 2006
    Posts
    259
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    i am trying to make my own be cause i need more experience with arrays because ill probably need them later

  4. #4
    Join Date
    Dec 2006
    Location
    Third rock from the sun.
    Posts
    2,510
    Mentioned
    4 Post(s)
    Quoted
    1 Post(s)

    Default

    Y'uve seemed to miss th' procedure tag there, guv'.

    Procedure tags are ver' important, without em, you're as a mouse to a pack o' stray cats, boy!

    Nev'r forget t' add th' procedure. Y'uve been warned!

    {Sorry, I get bored a lot}

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Player not found in player array?quikchat?
    By jerrysyron in forum OSR Help
    Replies: 2
    Last Post: 08-01-2008, 12:44 AM
  2. the new srl 4 player array
    By RudeBoiAlex in forum OSR Help
    Replies: 10
    Last Post: 08-23-2007, 09:53 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
  •