command does not charge correctly #19


  • New
  • Defect
Open
Assigned to kostronor
  • andycyxu created this issue Sep 21, 2013

    What steps will reproduce the problem?
    1. using the file prices.yml i uploaded
    2.
    3.

    What is the expected output? What do you see instead?

    this is a short version just to explain actual file is uploaded

    ^/tpa$: 100
    ^/tpaccept$: 15
    ^/warp help$: 0
    ^/warp vote$: 0
    ^/warp jobs$: 0
    ^/warp emerald$: 200
    ^/warp subway$: 0
    ^/warp mall$: 250
    ^/warp \S+$: 500                  ALL UP TO THIS LINE WORKS CORRECTLY
    ^/i 264$: 5000                    DOES NOT CHARGE $5000 FOR CMD /i 264  chrges only $5
    ^/i 264 \S+$: 5000             WORKS OK CHARGES $5000 FOR CMD /i 264 (anynumber here) Ex /i 264 5
    ^/item 264$: 5000               DOES NOT CHARGE $5000 FOR CMD /item 264  chrges only $5
    ^/item 264 \S+$: 5000        WORKS OK CHRGES $5000 FOR CMD /item 264 (anynumber here) Ex /item 264 5
    ^/item \S+$: 5                     works OK
    ^/i \S+$: 5                         works OK

    What version of the product are you using?
    version 11 with bukkit 1.6.4

    Do you have an error log of what happened?

    no error log
    Please provide any additional information below.

    if you can please see the long file attached (i hope)

  • andycyxu added the tags New Defect Sep 21, 2013
  • andycyxu added an attachment prices.yml Sep 21, 2013

    prices.yml

  • andycyxu posted a comment Sep 21, 2013

    I REMOVED ALL THESE FROM FILE

    • ^/warp \S+$: 500
    • ^/item \S+$: 5
    • ^/i \S+$: 5

    and everything works ok now, but i would have to list every item or price every warp separate... I though that ths command

    • ^<<command>> \S+$: 500 being listed last would take care of all the other commands that are the same such as /warp XXX but an exact match was not found
  • Kostronor posted a comment Sep 23, 2013

    I would suggest to write instead of:

    ^/item 15$: 5000
    ^/item 15 \S+$: 5000
    
    ^/item 15.*+$: 5000
    

    the .* means, that dot = every character and * means 0 to endless so from item 15 to item 15 152gbdhsjnak everythin is included ;)

    please try this first!

  • andycyxu posted a comment Sep 25, 2013

    @Kostronor: Go

    OK, well it doesn't help much it is however nicer then my 2 lines of text. what happens ex.

    • a) ^/i 17.*+$: 8
    • b) ^/item 17.*+$: 9
    • c) ^/i \S+$: 2
    • d) ^/item \S+$: 3
    • a) works great for ALL commands /i 17 and /i 17 <amount>
    • b) Does NOT work commands /item 17 and /item 17 <amount> fall under d)
    • c) Works fine for any and all /i <item> and /i <item> <amount> commands "respects above rule of a) so every /i wil get charged $2 except /i 17 will get $8 as defined by rule a)
    • d) works fine for all /item <item> and /item <item> <amount> however "hijacks"

    anyhow it is kinda hard testing it as it requires rebooting server every-time i change price.yml I consider it a minor flaw one can work around it like I said once the "generalized" such as /warp \S+$: <price> commands are removed everything works perfect so basically I removed them all EVEN THOUGH THEY WERE AT THE BOTTOM they seem to mess things up

    BTW great plugin!!! my players hate it!!! I love it!!!.... lazy bums but they still come on LOL

    So, if you want to look into it cool, if not like I said minor problem and again can be worked around

    Thanks Andy


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