Page 121 of 125 FirstFirst ... 21 71 111 119 120 121 122 123 ... LastLast
Results 1,201 to 1,210 of 1250

Thread: ZLib -- Zarqon's useful function library

  1. #1201
    Senior Member zarqon's Avatar
    Join Date
    Nov 2007
    Location
    Seoul, Korea
    Posts
    3,490

    Default

    Mysterious. vars[] isn't even a static variable -- it's loaded from your file every time you import ZLib -- so I have no idea where Barf Mountain could have come from if you had no such file. Check your mafia folder for any instances of zlib.ash and vars_CrankyOne.txt that may not be in the usual locations. That can sometimes cause confusion like this.

    Are all the instances of the problem only experienced by people using Harvest.ash? I've never used it but possibly Harvest is attempting to do something with ZLib settings that I hadn't accounted for. In that thread someone had a settings file with the space in the name not replaced by underscores -- how in the blue blazes would that happen?? ZLib has always replaced spaces with underscores. That makes me suspicious that it's something to do with that script. I should probably go have a look at it.

    @Veracity: Haha! NIH syndrome sounds about right! If we can do it exactly the way we want, why accept someone else's version? Or something like that. Most of my scripting energy is going to relay scripts these days and I will spend hours writing simple jQuery code that does what I want rather than add in some (already-fully-developed) plugin that already does what I want -- and 20 other things that I don't need.

    Also, I treasure every instance of "Zargon" on these forums.

    What I do not treasure is that someone gave ZLib a 1-star rating on SourceForge. This person says: "This is not zlib, this is a js library that couldn't find a proper name." A chronological snob! Now, anyone who Googles "kolmafia zlib" will see that it is rated 1 star in the search results.
    Sig by JakAtk
    My scripts: Prefref Plus | One-Click Wossname | Om******t (??) | Psychose-a-Matic | RandBot
    Combat suite: Best Between Battle | Mer********d (?!) | SmartStasis | BatMan | BatMan RE
    For script authors: ASH Wiki | ZLib | BatBrain | CLI Links | CanAdv | Script Registry | Map Manager | About Bats
    If you appreciate my work, help me become BAT KING OF THE WORLD! Thanks to all donators!

  2. #1202
    Senior Member zarqon's Avatar
    Join Date
    Nov 2007
    Location
    Seoul, Korea
    Posts
    3,490

    Default

    After some poking around, I see a problem in Harvest, and a problem in ZLib.

    Harvest: The relay script explicitly loads the settings map into vars[] in its main(). Again. This has always been redundant as that already happens in ZLib, but now that your vars data file doesn't contain defaults it's actually destructive, given that it has the effect of obliterating all the default values from vars[] that ZLib added back in when it was imported. This wouldn't be a problem if Harvest only used getvar() to reference script settings, but pre-transition it's kicking itself in the foot.

    There are some other things I'd change about Harvest (Why assign all the vars to more variables? Why have announce() when you've already imported vprint()?) but that's the only thing I found in my first pass that is definitely a problem to do with script settings.

    ZLib: was only adding the default values back in that were being initialized with setvar(). But in a larger script suite such as Harvest (or the BatMan RE world), scripts are referencing settings that haven't been initialized in that script. r34 adds all defaults back in, always. This was probably the crux of the issue.

    So, I've fixed my side of the issue. Once Harvest removes the problematic line we should be all clear.
    Sig by JakAtk
    My scripts: Prefref Plus | One-Click Wossname | Om******t (??) | Psychose-a-Matic | RandBot
    Combat suite: Best Between Battle | Mer********d (?!) | SmartStasis | BatMan | BatMan RE
    For script authors: ASH Wiki | ZLib | BatBrain | CLI Links | CanAdv | Script Registry | Map Manager | About Bats
    If you appreciate my work, help me become BAT KING OF THE WORLD! Thanks to all donators!

  3. #1203

    Default

    Hmm. I'm looking at the Harvest source, and I'm not sure what exactly you're referring to re: "explicitly loads the settings map into vars[] in its main()". I don't see anywhere in Harvest.ash that it assigns *anything* to vars[], for that matter -- it uses setvar() in its set_default_settings() call early on, but a quick grep for lines that contain both 'vars[' and '=' shows nothing other than the "assign vars to variables" bit you noted above. What are you referring to specifically?

  4. #1204
    Senior Member zarqon's Avatar
    Join Date
    Nov 2007
    Location
    Seoul, Korea
    Posts
    3,490

    Default

    The relay script -- which I believe exists to configure your settings -- not Harvest.ash.
    Sig by JakAtk
    My scripts: Prefref Plus | One-Click Wossname | Om******t (??) | Psychose-a-Matic | RandBot
    Combat suite: Best Between Battle | Mer********d (?!) | SmartStasis | BatMan | BatMan RE
    For script authors: ASH Wiki | ZLib | BatBrain | CLI Links | CanAdv | Script Registry | Map Manager | About Bats
    If you appreciate my work, help me become BAT KING OF THE WORLD! Thanks to all donators!

  5. #1205

    Default

    The relay script -- which I believe exists to configure your settings -- not Harvest.ash.
    Originally Posted by zarqon View Post
    Oh! Gotcha. Okay, I've removed the offending line from the relay script and pushed the resulting code back up to GitHub and Sourceforge. Thanks again for all your help with this.
    Last edited by coandco; 05-18-2017 at 04:42 PM.

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

    Default

    What I do not treasure is that someone gave ZLib a 1-star rating on SourceForge. This person says: "This is not zlib, this is a js library that couldn't find a proper name." A chronological snob! Now, anyone who Googles "kolmafia zlib" will see that it is rated 1 star in the search results.
    Originally Posted by zarqon View Post
    I gave it a 5-star review to help balance out that nonsensical review.
    If people like my scripts, please send me stuffed Hodgmen.
    Universal Recovery, OCD Inventory Control, CounterChecker, newLife, ChIT.


  7. #1207
    Senior Member zarqon's Avatar
    Join Date
    Nov 2007
    Location
    Seoul, Korea
    Posts
    3,490

    Default

    @Bale:

    To be fair, the other zlib was first but I certainly didn't know about it when I named this -- nor did I think they would ever inhabit the same space (it was way pre-mafia-having-SVN).
    Sig by JakAtk
    My scripts: Prefref Plus | One-Click Wossname | Om******t (??) | Psychose-a-Matic | RandBot
    Combat suite: Best Between Battle | Mer********d (?!) | SmartStasis | BatMan | BatMan RE
    For script authors: ASH Wiki | ZLib | BatBrain | CLI Links | CanAdv | Script Registry | Map Manager | About Bats
    If you appreciate my work, help me become BAT KING OF THE WORLD! Thanks to all donators!

  8. #1208
    Senior Member
    Join Date
    Apr 2009
    Posts
    1,750

    Default

    Maybe put a notice in the project description? Something like "This is a utility library for kolmafia. Not associated with the compression library.". Does that make sense?
    Last edited by xKiv; 05-19-2017 at 01:17 PM.

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

    Default

    Maybe put a notice in the project description? Something like "This is a utility library for kolmafia. Not associated with the compression library.". Does that make sense?
    Originally Posted by xKiv View Post
    And then we can all see what projects the original one star reviewer participated in and give them one star reviews for reasons that have nothing to do with the particular project...
    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

  10. #1210
    Senior Member zarqon's Avatar
    Join Date
    Nov 2007
    Location
    Seoul, Korea
    Posts
    3,490

    Default

    It already says quite prominently "Zarqon's ASH function library for KoLmafia". I actually intended to add a note like that yesterday, but then Sourceforge encourages you to include keywords in your description, to help with people searching for things. I may just attract further disappointment by including the keywords "compression library". No one who uses ZLib would even find it via Sourceforge. :/
    Sig by JakAtk
    My scripts: Prefref Plus | One-Click Wossname | Om******t (??) | Psychose-a-Matic | RandBot
    Combat suite: Best Between Battle | Mer********d (?!) | SmartStasis | BatMan | BatMan RE
    For script authors: ASH Wiki | ZLib | BatBrain | CLI Links | CanAdv | Script Registry | Map Manager | About Bats
    If you appreciate my work, help me become BAT KING OF THE WORLD! Thanks to all donators!

Similar Threads

  1. Replies: 1
    Last Post: 11-25-2013, 07:48 PM
  2. StDoodle's Libray - Another function library
    By StDoodle in forum Scripting Discussion
    Replies: 6
    Last Post: 10-29-2013, 11:04 PM
  3. ROFL -- Ridiculously Overelaborate Function Library
    By Catch-22 in forum Informational Scripts
    Replies: 6
    Last Post: 06-07-2012, 08:28 AM
  4. is there a way to see what a function within zlib returns?
    By maximillian the red in forum Community Support
    Replies: 6
    Last Post: 10-03-2011, 08:33 PM
  5. Adventure Function Library
    By muffins in forum Scripting Discussion
    Replies: 9
    Last Post: 05-06-2006, 01:45 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
  •