Results 1 to 15 of 15

Thread: Adding to Declare Players?

  1. #1
    Join Date
    Aug 2006
    Posts
    151
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default Adding to Declare Players?

    For my vial wanker instead of jsut using a const of total number of vials until excute i decided to take an extra step andf try to add a another integer to declare players but i have no clue how to. I want to make it reach the number of vials on the player than declare him inactive and switch to the next one but i dont know how to do this.


    SCAR Code:
    Players[0].Name     := '';
        Players[0].Pass     := '';
        Players[0].Nick     := '';
        Players[0].Vial     := ; //?
        Players[0].Active   := True;

    would i have to change vial with integer or could i declare it as in integer?

    Realy confused all help is apreciated thnx!

  2. #2
    Join Date
    Feb 2006
    Location
    London, England
    Posts
    2,045
    Mentioned
    2 Post(s)
    Quoted
    0 Post(s)

    Default

    You can't add to it.
    SRL Wiki | SRL Rules | SRL Stats
    Ultimate SCAR Scripting Tutorial | Starblaster100's Auth System | Join the official SRL IRC now!


    Help Keep SRL Alive! Please disable Advert Blockers on SRL! Help Keep SRL Alive!


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

    Default

    You can use integer1 though. Look at lines 52-80 in globals.scar for all the properties for each player you can use.

  4. #4
    Join Date
    Aug 2006
    Posts
    151
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    SCAR Code:
    Players[0].Name     := '';
        Players[0].Pass     := '';
        Players[0].Nick     := '';
        Players[0].Integer1 := '';//?
        Players[0].Active   := True;

    I tried that but it still said type mismatch did i jsut speel wrong or what?

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

    Default

    It's an integer. So use it like any other integer variable. (without the '')

  6. #6
    Join Date
    Aug 2006
    Posts
    151
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    wow my bad but now how would i make it call the player inactive once its max vial nubmer is reached?

    SCAR Code:
    procedure inactive;
    begin
    (Vialsfilled >Players[1].Integer1)then
    //how woudl i make it change the player to inactive?
    end;//?

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

    Default

    Players[currentplayer].active:=false;

  8. #8
    Join Date
    Aug 2006
    Posts
    151
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Code:
    procedure inactive;
    begin
    (Vialsfilled >Integer1)then
    Players[currentplayer].active:=false;
    end;
    
    Line 362: [Error] (18028:1): Identifier expected in script

    What am i doing wrong? IM sure its something simple and htnx for all the help!

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

    Default

    if

    procedure inactive;
    begin
    if (Vialsfilled >Integer1)then
    Players[currentplayer].active:=false;
    end;

  10. #10
    Join Date
    Aug 2006
    Posts
    151
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    SCAR Code:
    procedure inactive;
    begin
    if (Vialsfilled >.Integer1)then
    Players[currentplayer].active:=false;
    end;

    SCAR Code:
    Line 135: [Error] (17801:18): Syntax error in script

    am i jsut not putting in the right thing from declare players?

    heres my declare players

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

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

        Players[1].Name     := '';
        Players[1].Pass     := '';
        Players[1].Nick     := '';
        Players[1].Integer1 := 55;
        Players[1].Active   := True;

        Players[2].Name     := '';
        Players[2].Pass     := '';
        Players[2].Nick     := '';
        Players[2].Integer1 := 55;
        Players[2].Active   := True;

        Players[3].Name     := '';
        Players[3].Pass     := '';
        Players[3].Nick     := '';
        Players[3].Integer1 := 55;
        Players[3].Active   := True;
      end;

  11. #11
    Join Date
    Aug 2006
    Posts
    151
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    When I took the dot out and made it

    SCAR Code:
    procedure inactive;
    begin
    if (Vialsfilled >Integer1)then
    Players[currentplayer].active:=false;
    end;

    it gave me this error

    SCAR Code:
    Failed when compiling
    Line 135: [Error] (17801:18): Unknown identifier 'Integer1' in script

    I thought since it was in declare players it was declared a global variable? could some one please tell me wtf im doing wrong

  12. #12
    Join Date
    Dec 2006
    Posts
    374
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    hmm i think its like this, not sure though =/ but u can try it.

    SCAR Code:
    procedure inactive;
    begin
    if (Vialsfilled >Players[CurrentPlayer].Integer1)then
    Players[currentplayer].active:=false;
    end;
    Another awsome scripting forum! Check it out: www.Uberbroproductions.net/forums
    TRY MY VARROCK ZAMMY MAGE CURSER/CONFUSER/WEAKENER! THE LINK IS BELOW
    http://www.srl-forums.com/forum/varr...56.html?t=6356
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~


  13. #13
    Join Date
    Aug 2006
    Posts
    151
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    ok thnx that seems to have worked now one last question is for the main loop on the untill how would i do it?

    i want the script to terminate once all players are inactive how would i put that on the untill?

    below is jsut an ex.

    until (active > false)

  14. #14
    Join Date
    Dec 2006
    Posts
    374
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    if all the players are inactive script should stop on its own.. just use these if(not(loggedIn)) then Exit; cuz if all players are inactive then script is logged out and it wont move mouse crazily if u use if(not(loggedIn)) then Exit;
    Another awsome scripting forum! Check it out: www.Uberbroproductions.net/forums
    TRY MY VARROCK ZAMMY MAGE CURSER/CONFUSER/WEAKENER! THE LINK IS BELOW
    http://www.srl-forums.com/forum/varr...56.html?t=6356
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~


  15. #15
    Join Date
    Aug 2006
    Posts
    151
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. declare players
    By i 69 ur nan in forum OSR Help
    Replies: 3
    Last Post: 11-19-2008, 04:12 PM
  2. Declare Players
    By 13om13e12 in forum OSR Help
    Replies: 2
    Last Post: 06-05-2008, 01:41 PM
  3. Need Help on declare players.
    By Raskolnikov in forum OSR Help
    Replies: 2
    Last Post: 11-16-2007, 11:02 PM
  4. Declare players?
    By ironlarreh in forum OSR Help
    Replies: 3
    Last Post: 11-12-2007, 09:55 PM

Posting Permissions

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