Page 2 of 6 FirstFirst 1 2 3 4 ... LastLast
Results 11 to 20 of 53

Thread: Make your scripts automatically update their data files!

  1. #11
    Senior Member
    Join Date
    Feb 2009
    Posts
    182

    Default

    I'll make a bug report, then. Thanks!

  2. #12
    Senior Member bumcheekcity's Avatar
    Join Date
    Mar 2009
    Posts
    1,401

    Default

    Zarqon, I'm trying to use your script to get back a string[int][string][string] map I've made, but it just gives me the first entry and then an unexpected error (included here in case it makes it obvious to everyone).

    =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
    KoLmafia r7859, Windows XP, Java 1.6.0_17
    =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
    Please note: do not post these logs in the KoLmafia thread. If
    you would like us to look at the log, please instead email logs
    to [email protected] using the subject "KoLmafia Debug Log"
    =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
    Timestamp: Mon Dec 21 21:46:08 GMT 2009
    =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=


    Unexpected error, debug log printed.
    class java.lang.ArrayIndexOutOfBoundsException: 3
    java.lang.ArrayIndexOutOfBoundsException: 3
    at net.sourceforge.kolmafia.textui.parsetree.Composit eValue.read(CompositeValue.java:133)
    at net.sourceforge.kolmafia.textui.parsetree.Composit eValue.read(CompositeValue.java:147)
    at net.sourceforge.kolmafia.textui.parsetree.Composit eValue.read(CompositeValue.java:147)
    at net.sourceforge.kolmafia.textui.RuntimeLibrary.rea dMap(RuntimeLibrary.java:3543)
    at net.sourceforge.kolmafia.textui.RuntimeLibrary.fil e_to_map(RuntimeLibrary.java:3515)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Nativ e Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(Unknow n Source)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(Un known Source)
    at java.lang.reflect.Method.invoke(Unknown Source)
    at net.sourceforge.kolmafia.textui.parsetree.LibraryF unction.execute(LibraryFunction.java:119)
    at net.sourceforge.kolmafia.textui.parsetree.Function Call.execute(FunctionCall.java:156)
    at net.sourceforge.kolmafia.textui.parsetree.BasicSco pe.execute(BasicScope.java:451)
    at net.sourceforge.kolmafia.textui.parsetree.UserDefi nedFunction.execute(UserDefinedFunction.java:127)
    at net.sourceforge.kolmafia.textui.parsetree.Function Call.execute(FunctionCall.java:156)
    at net.sourceforge.kolmafia.textui.parsetree.BasicSco pe.execute(BasicScope.java:451)
    at net.sourceforge.kolmafia.textui.parsetree.UserDefi nedFunction.execute(UserDefinedFunction.java:127)
    at net.sourceforge.kolmafia.textui.Interpreter.execut eScope(Interpreter.java:252)
    at net.sourceforge.kolmafia.textui.Interpreter.execut e(Interpreter.java:191)
    at net.sourceforge.kolmafia.textui.Interpreter.execut e(Interpreter.java:184)
    at net.sourceforge.kolmafia.textui.command.CallScript Command.call(CallScriptCommand.java:193)
    at net.sourceforge.kolmafia.textui.command.CallScript Command.run(CallScriptCommand.java:63)
    at net.sourceforge.kolmafia.KoLmafiaCLI.executeComman d(KoLmafiaCLI.java:473)
    at net.sourceforge.kolmafia.KoLmafiaCLI.executeLine(K oLmafiaCLI.java:366)
    at net.sourceforge.kolmafia.swingui.CommandDisplayFra me$CommandQueueHandler.handleQueue(CommandDisplayF rame.java:191)
    at net.sourceforge.kolmafia.swingui.CommandDisplayFra me$CommandQueueHandler.run(CommandDisplayFrame.jav a:172)
    I get this with the latest and the last stable (v7859). Also, is there a way to view the maps in our browsers, i.e. not through kolmafia, to remind us exactly what we've uploaded?

  3. #13
    Developer Veracity's Avatar
    Join Date
    Mar 2006
    Location
    The Unseelie Court
    Posts
    11,389

    Default

    I get this with the latest and the last stable (v7859).
    Originally Posted by bumcheekcity View Post
    The "last stable" is 7859? What does that mean? "Stable" in what sense?
    Ph'nglui mglw'nafh Cthulhu
    R'lyeh wgah-nagl fhtagn.

  4. #14
    Senior Member bumcheekcity's Avatar
    Join Date
    Mar 2009
    Posts
    1,401

    Default

    Stable in the sense that it was the last daily before the big changes to the code that caused a lot of the "Unexpected Errors" happened. It also happens on 13.7.exe.

  5. #15
    Senior Member
    Join Date
    Feb 2009
    Posts
    182

    Default

    Also, is there a way to view the maps in our browsers, i.e. not through kolmafia, to remind us exactly what we've uploaded?
    Originally Posted by bumcheekcity View Post
    Another feature request: would it be possible to have some kind of diff display? It's great that anyone can update the maps, but it would be very helpful to know what, exactly, has been updated on "my" maps when I'm not the one who's updated them. Or what's been updated for any updated map, really.

    (Sure, an intelligent and foresightful person would keep separate copies so the auto-overwritten version could be compared to older versions... but apparently I am not that person.)

    Then again, this might be more storage and fancification than you want to put into this project, which would be understandable -- it's already very useful as-is.

  6. #16
    Senior Member zarqon's Avatar
    Join Date
    Nov 2007
    Location
    Seoul, Korea
    Posts
    3,558

    Default

    @bumcheek: If you enter the URL used by mafia you can see your map:

    http://zachbardon.com/mafiatools/aut...les&act=getmap

    Note that you would replace "turtles" with the name of your map, sans extension. When I get back home (I'm visiting my parents for the holidays) I'll turn the filenames on the website into the corresponding links.

    @aqualectrix: Sorry, that's a lot of work that I don't want to do. I'm fine with information being free (to modify without notice). For what it's worth, I don't have backups of any of my data files either! (However, that's because I know the server's admin and he does daily backups so I could always revert any file on my server to whatever date I want.)
    Sig by JakAtk
    My scripts: Prefref Plus | Skillref Plus | One-Click Wossna | Om*****st (??) | Psychose-a-Matic | RandBot
    Combat suite: Best Between Battle | Mercenary Mood | SmartStasis | BatMan | BatMan RE
    For script authors: ASH Wiki | ZLib | BatBrain | CLI Links | Drag-n-Drop Inventories | CanAdv | Script Registry | Map Manager
    If you appreciate my work, help me become BAT KING OF THE WORLD! Thanks to all donators!

  7. #17
    Senior Member
    Join Date
    Feb 2009
    Posts
    182

    Default

    That's perfectly fine! (I'm also fine with it being modifiable by anyone, I just wondered what was being modified.) A lot of work you don't want to do -- that's work you shouldn't do, I'd say!

  8. #18
    Senior Member zarqon's Avatar
    Join Date
    Nov 2007
    Location
    Seoul, Korea
    Posts
    3,558

    Default

    Ok, maps are viewable as text on the website now, without disclosing the actual file location. Yay.

    I also have the function made that will go in ZLib to handle this! Next update will be a nice one!
    Sig by JakAtk
    My scripts: Prefref Plus | Skillref Plus | One-Click Wossna | Om*****st (??) | Psychose-a-Matic | RandBot
    Combat suite: Best Between Battle | Mercenary Mood | SmartStasis | BatMan | BatMan RE
    For script authors: ASH Wiki | ZLib | BatBrain | CLI Links | Drag-n-Drop Inventories | CanAdv | Script Registry | Map Manager
    If you appreciate my work, help me become BAT KING OF THE WORLD! Thanks to all donators!

  9. #19
    Senior Member zarqon's Avatar
    Join Date
    Nov 2007
    Location
    Seoul, Korea
    Posts
    3,558

    Default

    The latest ZLib now contains load_current_map(), which accepts maps of any structure. This makes automatically updating data files in your scripts a ridiculously simple matter. w00t!
    Sig by JakAtk
    My scripts: Prefref Plus | Skillref Plus | One-Click Wossna | Om*****st (??) | Psychose-a-Matic | RandBot
    Combat suite: Best Between Battle | Mercenary Mood | SmartStasis | BatMan | BatMan RE
    For script authors: ASH Wiki | ZLib | BatBrain | CLI Links | Drag-n-Drop Inventories | CanAdv | Script Registry | Map Manager
    If you appreciate my work, help me become BAT KING OF THE WORLD! Thanks to all donators!

  10. #20
    Minion Bale's Avatar
    Join Date
    Jun 2008
    Posts
    13,287

    Default

    Congratulations. I know how long you've wanted to do that. 'Tis a frabjous day!
    If people like my scripts, please send me stuffed Hodgmen.
    Universal Recovery, OCD Inventory Control, CounterChecker, newLife, ChIT.


Similar Threads

  1. Replies: 0
    Last Post: 04-02-2015, 12:40 PM
  2. data files
    By bordemstirs in forum Scripting Discussion
    Replies: 6
    Last Post: 10-16-2011, 07:16 AM
  3. Bug - Fixed Data files not removed with "update clear"
    By lostcalpolydude in forum Bug Reports
    Replies: 1
    Last Post: 05-13-2011, 04:40 PM
  4. data files
    By martialis in forum Scripting Discussion
    Replies: 12
    Last Post: 05-09-2009, 07:00 AM
  5. Problem with .bat files calling scripts
    By Sako in forum Scripting Discussion
    Replies: 2
    Last Post: 08-01-2007, 07:48 AM

Posting Permissions

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