Results 1 to 4 of 4

Thread: Using multiple players..

  1. #1
    Join Date
    Jan 2007
    Location
    Toronto.
    Posts
    150
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default Using multiple players..

    Well ive made this PowerCutter which works great except there's one more thing im trying to add and thats multiplayer support, it does the loads told then "NextPlayer" appears in the Debug box but nothing happens.. here my procedure:

    SCAR Code:
    procedure MainLoop;
      begin
         repeat
          ChopTree;
         until(InvFull)
            begin
              DropTheLogs;
              Loads := Loads+1;
            end;
          if(LoggedIn)and
            (Loads > Load)then
              begin
                NextPlayer(True);
             end;
        end;

    Any help with is greatly appreciated.

  2. #2
    Join Date
    Sep 2006
    Posts
    5,219
    Mentioned
    4 Post(s)
    Quoted
    1 Post(s)

    Default

    SCAR Code:
    procedure MainLoop;
    begin
      repeat
        ChopTree;
      until(InvFull)
      DropTheLogs;
      Loads := Loads+1;
      if(LoggedIn) and (Loads > Load)then
      begin
        NextPlayer(True);
      end;




    SCAR Code:
    begin
      DeclarePlayers;
      Setup;
      repeat
        MainLoop;
      until isfkeydown(12);
      WriteLn('Script ended at: '+TheTime);
    end.

    try that

  3. #3
    Join Date
    Jan 2007
    Location
    Toronto.
    Posts
    150
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Quote Originally Posted by Boreas View Post
    ScarScript:By Drunkenoldma
    procedure MainLoop; begin repeat ChopTree; until(InvFull) DropTheLogs; Loads := Loads+1; if(LoggedIn) and (Loads > Load)then begin NextPlayer(True); end;

    ScarScript:By Drunkenoldma
    begin DeclarePlayers; Setup; repeat MainLoop; until isfkeydown(12); WriteLn('Script ended at: '+TheTime); end.

    try that
    Tried that and it didn't work, thanks anyway. I am getting lots of Access violation errors so I am gonna try and reinstall SRL and see what happens.

    The problem is definetly with that.. when id do something simple like this:

    SCAR Code:
    procedure DeclarePlayers;
     begin
        HowManyPlayers := 1;
        CurrentPlayer:= 0;
        NumberOfPlayers(HowManyPlayers);

        Players[0].Name     := ' ';
        Players[0].Pass     := ' ';
        Players[0].Nick     := '  ';
        Players[0].Active   := True;
    end;

    begin
    SetupSRL;
    DeclarePlayers;
    LoginPlayer;
    end.

    I get the same error every time:

    Code:
    Successfully compiled
    [Runtime Error] : Exception: Access violation at address 0064FEA2 in module 'scar.exe'. Read of address 00000000 in line 353 in script C:\Program Files\SCAR 2.03\includes\srl\srl\core\Text.scar

  4. #4
    Join Date
    Dec 2006
    Posts
    249
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    I think you might need to have a second player section ie. Players[1]...

    ScarPreRelease 3.23 rev 80, Includes - Dev Rev 457

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Multiple keypresses
    By Macros in forum Java Help and Tutorials
    Replies: 7
    Last Post: 03-02-2009, 08:52 PM
  2. Multiple PC on 1 IP
    By ron1337 in forum News and General
    Replies: 6
    Last Post: 11-01-2008, 11:13 PM
  3. Multiple Bitmaps
    By looneytoon in forum OSR Help
    Replies: 2
    Last Post: 08-12-2007, 07:36 PM
  4. active players? multiple logins?
    By Martingon in forum OSR Help
    Replies: 5
    Last Post: 05-08-2007, 04:43 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
  •