size of a list #133


  • New
  • Enhancment
Open
Assigned to _ForgeUser8773666
  • _ForgeUser4279113 created this issue Jun 15, 2014

    What is the enhancement in mind? How should it look and feel?

    Actually @PLAYER @player.list allow us to have the size of a list promted on the chat, but it would be better if the @player.list returned the size of the list whatever the command we are using.

    Please provide any additional information below.

  • _ForgeUser4279113 added the tags New Enhancment Jun 15, 2014
  • Lyoko_Firelyte posted a comment Jul 1, 2014

    I don't understand what you mean on this one, could you explain?

  • _ForgeUser4279113 posted a comment Jul 5, 2014

    What I mean is that we should have a way to get the size of a list inside a trigger other than using the @PLAYER @player.list For example a functionnal place holder name size which could work like <size:@player.list> and get us the actual size of the list or that when we use @player.list anywhere and its automatically replaced by the actual size of the list

  • Lyoko_Firelyte posted a comment Jul 7, 2014

    @neomatamune: Go

    What's wrong with that? Where would you need to say @player.list as a string? You can get things out of the list with @player.list[index] so I don't see why it needs its own placeholder :\

  • _ForgeUser4279113 posted a comment Jul 9, 2014

    There is an example then : We want a group of 5 players to enter an area to trigger an event so on EnterArea we add

    @ADDLIST @list.player <playername>

    and then we need something like

    @IF i <size:@list.player> = 5

    /... some instructions here .../

    @ENDIF

    But as of now we can't do it because if we use

    @IF i @list.player = 5

    it will always be false... that's why it would be great to have a way to get the size of a list easily.


    Edited Jul 9, 2014
  • ancienttom posted a comment Jul 21, 2014

    @neomatamune: Go

    I, also would like clarification. Isn't $Player.List without an index the size of the list? Why wouldn't '@IF i $Player.list = 5' work? Does $Player.List not work in an @IF statement or is the size that should be an integer being saved as a string?

    Also, if you want to do @Player <var:$Obj.Listsize>,Won't '@SETINT $Obj.Listsize $PLayers.List' work?

    I haven't used the list feature yet, because I can't run ver. 1.3. I still look through these posts to gain insight on using VT for when I do finally upgrade my server.


    Edited Jul 21, 2014
  • _ForgeUser4279113 posted a comment Aug 15, 2014

    @AncientTom:

    Not now, for the moment I can only get the size of a list in a @PLAYER command in the others commands there are actualy no way to get the size of the list... But i'd trully like that

    @IF @data.list < 5

    @ADDLIST @data.list something

    @ENDIF

    could work like that... But for now I didn't found any way to have it for now...


    Edited Aug 15, 2014

To post a comment, please login or register a new account.