Results 1 to 8 of 8

Thread: 17531: ASH will issue "friendly warnings" for $item[], to_item(), $effect, to_effect(

  1. #1
    Feed Reader RSS Bot's Avatar
    Join Date
    Jul 2009
    Posts
    10,336

    RSS 17531: ASH will issue "friendly warnings" for $item[], to_item(), $effect, to_effect(

    ASH will issue "friendly warnings" for $item[], to_item(), $effect, to_effect()
    when the specified item or effect name matches to multiple items/effects. It
    tells you which one it will use (the one with the highest ID) and lists all
    of the possibilities.

    by veracity0 on 2016-12-14 19:36:50

    M /src/net/sourceforge/kolmafia/textui/DataTypes.java (view) (diff)
    M /src/net/sourceforge/kolmafia/textui/Interpreter.java (view) (diff)
    M /src/net/sourceforge/kolmafia/textui/Parser.java (view) (diff)
    M /src/net/sourceforge/kolmafia/textui/RuntimeLibrary.java (view) (diff)
    M /src/net/sourceforge/kolmafia/textui/parsetree/ProxyRecordValue.java (view) (diff)
    M /src/net/sourceforge/kolmafia/textui/parsetree/Type.java (view) (diff)
    M /src/net/sourceforge/kolmafia/textui/parsetree/Value.java (view) (diff)
    Download the latest KolMafia build here.
    Every new revision posted within the hour.
    New EXE builds every Monday.

  2. #2
    Developer fronobulax's Avatar
    Join Date
    Feb 2009
    Location
    D.C. suburbs of Virginia, USA
    Posts
    3,656

    Default

    I like this. Thank you.
    You just vehemently agreed with me
    Originally Posted by Veracity View Post
    I agree with frono.
    Originally Posted by Veracity View Post
    There are 69 players more powerful than you.
    Originally Posted by Statistics Leaderboards

  3. #3
    Senior Member
    Join Date
    Jan 2014
    Posts
    126

    Default

    Code:
    > ash to_item("2325")
    
    Multiple matches for "2325"; using "[2325]Staff of Ed". () Clarify by using one of:
    "[2325]Staff of Ed"
    "[7961]Staff of Ed"
    "2325" should be unambiguous. Bug?

  4. #4
    Developer Veracity's Avatar
    Join Date
    Mar 2006
    Location
    The Unseelie Court
    Posts
    10,669

    Default

    Could be.
    Ph'nglui mglw'nafh Cthulhu
    R'lyeh wgah-nagl fhtagn.

  5. #5
    Developer Veracity's Avatar
    Join Date
    Mar 2006
    Location
    The Unseelie Court
    Posts
    10,669

    Default

    Although, I don't know why you'd not simply pass in an integer, rather than the string representation of an integer.

    to_item( 2325 )
    Ph'nglui mglw'nafh Cthulhu
    R'lyeh wgah-nagl fhtagn.

  6. #6
    Minion Bale's Avatar
    Join Date
    Jun 2008
    Posts
    13,055

    Default

    Although, I don't know why you'd not simply pass in an integer, rather than the string representation of an integer.
    Originally Posted by Veracity View Post
    He has certain ideas about making his script able to run on outdated versions of KoLmafia. Passing items as strings allows him to accomplish that. Then a lot of the code remains even after a new point release comes out that makes it unnecessary. I noticed this one amongst the multitude of friendly warnings that was being kicked out by Guide and was thinking of reporting it myself if he did not.

    tl;dr:, He actually has a good reason for doing something that appears dumb.
    If people like my scripts, please send me stuffed Hodgmen.
    Universal Recovery, OCD Inventory Control, CounterChecker, newLife, ChIT.


  7. #7
    Developer Veracity's Avatar
    Join Date
    Mar 2006
    Location
    The Unseelie Court
    Posts
    10,669

    Default

    Well, you can say $item[2325] and that is unambiguous, so, yes - it should work for to_item( string ). Working on it. How hard can it be?
    Ph'nglui mglw'nafh Cthulhu
    R'lyeh wgah-nagl fhtagn.

  8. #8
    Developer Veracity's Avatar
    Join Date
    Mar 2006
    Location
    The Unseelie Court
    Posts
    10,669

    Default

    Revision 17534
    Ph'nglui mglw'nafh Cthulhu
    R'lyeh wgah-nagl fhtagn.

Posting Permissions

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