Page 2 of 3 FirstFirst 123 LastLast
Results 26 to 50 of 54

Thread: How to add the SRL Player Form to your script

  1. #26
    Join Date
    Aug 2009
    Location
    Nova Scotia, Canada
    Posts
    604
    Mentioned
    0 Post(s)
    Quoted
    56 Post(s)

    Default

    Quote Originally Posted by Coh3n View Post
    E: The list won't populate. You have to manually add the players you want to use. I wanted to have a TCheckBoxList so the user would just select the players they want to use, but Lape doesn't support a TCheckBoxList yet, so for now, you'll just have to manually add the players you want to use.
    So...If I understand this:

    First you have to populate the player file ahead of time using the Player Manager. Then when you select that player file in the player form it DOES NOTHING. You have to memorize the names of the players and add them manually one at a time. Am I missing something here?

    Wow. Just Wow. Kinda defeats the point of trying to make it easier for the user by having a player form.
    Never ever approach a computer saying or even thinking "I will just do this quickly".

  2. #27
    Join Date
    Dec 2011
    Location
    Hyrule
    Posts
    8,662
    Mentioned
    179 Post(s)
    Quoted
    1870 Post(s)

    Default

    Quote Originally Posted by Bixby Sayz View Post
    So...If I understand this:

    First you have to populate the player file ahead of time using the Player Manager. Then when you select that player file in the player form it DOES NOTHING. You have to memorize the names of the players and add them manually one at a time. Am I missing something here?

    Wow. Just Wow. Kinda defeats the point of trying to make it easier for the user by having a player form.
    It's just the nicknames of the players you have to input... why not just name them player1, player2, etc.

    But yeah it would be nice if it auto populated them as well

  3. #28
    Join Date
    Aug 2009
    Location
    Nova Scotia, Canada
    Posts
    604
    Mentioned
    0 Post(s)
    Quoted
    56 Post(s)

    Default

    For my purposes this is at least double the work of having the user simply fill out the players in DeclarePlayers.

    For my script there are no additional settings beyond the username/password. All I want to do is:
    1) Maintain list of players (with their login information).
    2) Maintain which players are active (and it does not do this that I see)
    3) (Optional) Maintain individual player stats between sessions.

    Guess I'll skip the player form as a lost cause and simply have user manually fill out DeclarePlayers. It will actually be faster.
    Never ever approach a computer saying or even thinking "I will just do this quickly".

  4. #29
    Join Date
    Apr 2008
    Location
    Marquette, MI
    Posts
    15,252
    Mentioned
    138 Post(s)
    Quoted
    680 Post(s)

    Default

    Quote Originally Posted by Bixby Sayz View Post
    For my purposes this is at least double the work of having the user simply fill out the players in DeclarePlayers.

    For my script there are no additional settings beyond the username/password. All I want to do is:
    1) Maintain list of players (with their login information).
    2) Maintain which players are active (and it does not do this that I see)
    3) (Optional) Maintain individual player stats between sessions.

    Guess I'll skip the player form as a lost cause and simply have user manually fill out DeclarePlayers. It will actually be faster.
    You're completely missing the point of the whole system, which isn't surprising since you like to jump to your own conclusions and insult anything you don't understand. I'll explain the system the best I can, and if you still don't like it, fine, don't use it.

    We have Rafiki to greatly increase user's security. Utilizing Rafiki requires users to only input their username and password once. They don't have to input their private information for every script they use. This is good for when people post scripts on the forum -- they won't accidentally leave their password in the script because it was never there. Rafiki also has an encryption option, meaning if someone is using a shared computer, another person can't just open a Simba file and get usernames and passwords.

    That is the main purpose for Rafiki.

    And it is not double the work. It's not like the user has to fill out Rafiki and your script EVERY time they want to use your script. They fill out Rafiki once and only once, then they can easily setup EVERY OTHER SRL script they wish to use.

    The reason for the SRL Player Form is to make setting up scripts easier for users (obviously), which you seem to disagree. Even in your case, when you don't have additional setup options outside username/password, using the SRL Player Form will likely be easier for users. Believe it or not, people that have never seen code before get confused, even in the simplest concepts. Weird, right?

    Another neat thing, the SRL Player Form is completely optional. So here's a thought: instead of being childish and ripping apart something you don't like, suggest something that you think might make it better.

    I'll address your 3 things above, which, by the way, are all done regardless if you use the player form or not.

    1) Not exactly sure how to explain this one. If you go through this guide and use the form properly, you have access to the "players" array which is the exact same array that is set in the standard declarePlayers() procedure.
    2) When a user adds a player to the SRL Player Form, it's automatically set to active. If you think the player list should be automatically filled, and then have and "Active" check box, feel free to suggest it. Maybe this would have gotten you somewhere.
    3) Has nothing to do with the SRL Player Form. You're free to use the booleans, integers, extended, and strings variables built into the TPlayer type either way.

    There, I'm done.

    E: Another thing that made me laugh. You said people have to memorize player names. How many people have so many accounts that they don't know the names? And of those people, how many don't keep a list of the player names? I'm guessing almost 0. And even then, guess where they have a list of their players? RAFIKI.
    Last edited by Coh3n; 03-06-2014 at 12:08 AM.

  5. #30
    Join Date
    Aug 2009
    Location
    Nova Scotia, Canada
    Posts
    604
    Mentioned
    0 Post(s)
    Quoted
    56 Post(s)

    Default

    Have to admit my eyes glazed over and I zoned out reading your fun filled rant. I assume it was enlightening.

    As for a suggestion...Have been thinking about this a lot in my spare time. One simple change would make this whole process fairly painless. If the settings file exists have the player form load it (as it does now). If it does not exist then when the user selects a player file load all the players from the file (or prompt and give an option to). Far easier to delete the few players you don't want with a few button clicks than to manually type in the name of each and every player you want to use. Simple. And much more user friendly.
    Never ever approach a computer saying or even thinking "I will just do this quickly".

  6. #31
    Join Date
    Apr 2008
    Location
    Marquette, MI
    Posts
    15,252
    Mentioned
    138 Post(s)
    Quoted
    680 Post(s)

    Default

    Quote Originally Posted by Bixby Sayz View Post
    Have to admit my eyes glazed over and I zoned out reading your fun filled rant. I assume it was enlightening.

    As for a suggestion...Have been thinking about this a lot in my spare time. One simple change would make this whole process fairly painless. If the settings file exists have the player form load it (as it does now). If it does not exist then when the user selects a player file load all the players from the file (or prompt and give an option to). Far easier to delete the few players you don't want with a few button clicks than to manually type in the name of each and every player you want to use. Simple. And much more user friendly.
    Sounds like a good change. Feel free to open a suggestion here.

  7. #32
    Join Date
    Apr 2008
    Location
    Marquette, MI
    Posts
    15,252
    Mentioned
    138 Post(s)
    Quoted
    680 Post(s)

    Default

    Updated to include hints that have been added in Simba 1.1.

  8. #33
    Join Date
    Jun 2007
    Location
    The land of the long white cloud.
    Posts
    3,702
    Mentioned
    261 Post(s)
    Quoted
    2006 Post(s)

  9. #34
    Join Date
    Apr 2008
    Location
    Marquette, MI
    Posts
    15,252
    Mentioned
    138 Post(s)
    Quoted
    680 Post(s)

    Default

    Quote Originally Posted by The Mayor View Post
    New form is nice
    That was all @Olly;

    He added a lot of form features to Simba and built the current player form from my original codebase, I believe.

  10. #35
    Join Date
    Jan 2012
    Location
    East Coast
    Posts
    733
    Mentioned
    81 Post(s)
    Quoted
    364 Post(s)

    Default

    Quote Originally Posted by The Mayor View Post
    New form is nice
    Quote Originally Posted by Coh3n View Post
    That was all @Olly;

    He added a lot of form features to Simba and built the current player form from my original codebase, I believe.

    Getting this error when I run the test script in OP:

    Simba Code:
    Error: "Willow" is not a valid boolean. at line 56
    Execution failed.
    The following bitmaps were not freed: [Minimap Mask]

  11. #36
    Join Date
    Nov 2014
    Posts
    104
    Mentioned
    12 Post(s)
    Quoted
    59 Post(s)

    Default

    Quote Originally Posted by Ross View Post
    Getting this error when I run the test script in OP:

    Simba Code:
    Error: "Willow" is not a valid boolean. at line 56
    Execution failed.
    The following bitmaps were not freed: [Minimap Mask]
    Yeah, for some reason the code thinks there are four booleans instead of three! Should probably be fixed like so.
    Simba Code:
    // booleans
    booleans[0] := strToBool(playerForm.players[i].settings[3]);
    booleans[1] := strToBool(playerForm.players[i].settings[4]);
    booleans[2] := strToBool(playerForm.players[i].settings[5]);

    // strings
    strings[0] := playerForm.players[i].settings[6];

  12. #37
    Join Date
    Apr 2008
    Location
    Marquette, MI
    Posts
    15,252
    Mentioned
    138 Post(s)
    Quoted
    680 Post(s)

    Default

    Quote Originally Posted by Ross View Post
    Getting this error when I run the test script in OP:

    Simba Code:
    Error: "Willow" is not a valid boolean. at line 56
    Execution failed.
    The following bitmaps were not freed: [Minimap Mask]
    Quote Originally Posted by akarigar View Post
    Yeah, for some reason the code thinks there are four booleans instead of three! Should probably be fixed like so.
    Simba Code:
    // booleans
    booleans[0] := strToBool(playerForm.players[i].settings[3]);
    booleans[1] := strToBool(playerForm.players[i].settings[4]);
    booleans[2] := strToBool(playerForm.players[i].settings[5]);

    // strings
    strings[0] := playerForm.players[i].settings[6];
    Thank you both; I've updated the attachment.

  13. #38
    Join Date
    Jan 2012
    Location
    East Coast
    Posts
    733
    Mentioned
    81 Post(s)
    Quoted
    364 Post(s)

    Default

    Quote Originally Posted by Coh3n View Post
    Thank you both; I've updated the attachment.
    You're welcome

  14. #39
    Join Date
    Oct 2011
    Posts
    422
    Mentioned
    15 Post(s)
    Quoted
    116 Post(s)

    Default

    I just ran your test script, and it crashed simba without any warning whatsoever. Anything I can do to debug this?

  15. #40
    Join Date
    Nov 2014
    Posts
    104
    Mentioned
    12 Post(s)
    Quoted
    59 Post(s)

    Default

    Quote Originally Posted by slushpuppy View Post
    I just ran your test script, and it crashed simba without any warning whatsoever. Anything I can do to debug this?
    Yeah looks like @Coh3n updated the tutorial but not the script. Just change line 58 to the following and it should work.
    Simba Code:
    strings[0] := playerForm.players[i].settings[6];

  16. #41
    Join Date
    Oct 2011
    Posts
    422
    Mentioned
    15 Post(s)
    Quoted
    116 Post(s)

    Default

    Quote Originally Posted by akarigar View Post
    Yeah looks like @Coh3n updated the tutorial but not the script. Just change line 58 to the following and it should work.
    Simba Code:
    strings[0] := playerForm.players[i].settings[6];
    Still a catastrophic crash hmm..

  17. #42
    Join Date
    Sep 2012
    Location
    Here.
    Posts
    2,007
    Mentioned
    88 Post(s)
    Quoted
    1014 Post(s)

    Default

    Quote Originally Posted by slushpuppy View Post
    Still a catastrophic crash hmm..
    At what point does it crash? Even before bringing up the form?

  18. #43
    Join Date
    Oct 2011
    Posts
    422
    Mentioned
    15 Post(s)
    Quoted
    116 Post(s)

    Default

    Quote Originally Posted by Kevin View Post
    At what point does it crash? Even before bringing up the form?
    Yes. No errors logged to any of the srl_error files

  19. #44
    Join Date
    Sep 2012
    Location
    Here.
    Posts
    2,007
    Mentioned
    88 Post(s)
    Quoted
    1014 Post(s)

    Default

    Quote Originally Posted by slushpuppy View Post
    Yes. No errors logged to any of the srl_error files
    Hmm... I just downloaded it and ran it fine. try force updating srl?

  20. #45
    Join Date
    Oct 2011
    Posts
    422
    Mentioned
    15 Post(s)
    Quoted
    116 Post(s)

    Default

    Quote Originally Posted by Kevin View Post
    Hmm... I just downloaded it and ran it fine. try force updating srl?
    Done. No effect. It works fine for my windows 8 desktop, not on this tho.. what library dependencies are called using this playerform thing?

  21. #46
    Join Date
    Sep 2012
    Location
    Here.
    Posts
    2,007
    Mentioned
    88 Post(s)
    Quoted
    1014 Post(s)

    Default

    Quote Originally Posted by slushpuppy View Post
    Done. No effect. It works fine for my windows 8 desktop, not on this tho.. what library dependencies are called using this playerform thing?
    None that I really know of besides whatever LAPE uses... @Olly; ?

  22. #47
    Join Date
    Nov 2011
    Location
    England
    Posts
    3,072
    Mentioned
    296 Post(s)
    Quoted
    1094 Post(s)

    Default

    Quote Originally Posted by kevin View Post
    none that i really know of besides whatever lape uses... @olly; ?
    lcl?

  23. #48
    Join Date
    Jul 2014
    Location
    My computer
    Posts
    78
    Mentioned
    8 Post(s)
    Quoted
    21 Post(s)

    Default

    Quote Originally Posted by Ross View Post
    Getting this error when I run the test script in OP:

    Simba Code:
    Error: "Willow" is not a valid boolean. at line 56
    Execution failed.
    The following bitmaps were not freed: [Minimap Mask]
    I had the same problem, even after using the updated script. I fixed it by changing the declarePlayers() so it looks like this:
    Simba Code:
    for i := 0 to high(players) do
        with players[i] do
        begin
          // convert the integers
          integers[0] := strToInt(playerForm.players[i].settings[0]);
          integers[1] := strToInt(playerForm.players[i].settings[1]);
          integers[2] := strToInt(playerForm.players[i].settings[2]);

          // booleans
          booleans[0] := strToBool(playerForm.players[i].settings[4]); //changed all 3 bools to come after settings[3] since it is the combo box and not a check box
          booleans[1] := strToBool(playerForm.players[i].settings[5]);
          booleans[2] := strToBool(playerForm.players[i].settings[6]);

          // strings
          strings[0] := playerForm.players[i].settings[3]; //changed this to settings[3]

          // any other data types you've decided to use
        end;

    I assume this fixes it because the player form reads the combo boxes into the settings before the check boxes, so if it isn't working for others, this was my solution.
    Now everything works fine and it has all the correct info in debug.

  24. #49
    Join Date
    Mar 2013
    Posts
    42
    Mentioned
    0 Post(s)
    Quoted
    18 Post(s)

    Default

    Thank you Coh3n for posting this guide! It's really helping newbie scripters like me get a handle on it.

  25. #50
    Join Date
    Feb 2015
    Location
    Australia
    Posts
    6
    Mentioned
    0 Post(s)
    Quoted
    1 Post(s)

    Default

    This is a fantastic, made adding this feature a breeze. However I noticed that if you don't set any options that the user can modify (basically leaving initPlayerForm and declarePlayers blank) it produces a weird form that is too small for you to click on anything and can't be resized.
    Anyways, thanks a ton for this!

Page 2 of 3 FirstFirst 123 LastLast

Thread Information

Users Browsing this Thread

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

Posting Permissions

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