Author Topic: Methods from OLB resources not working?  (Read 72 times)

gmanplays@gmail.com

  • Newbie
  • *
  • Posts: 11
    • View Profile
Methods from OLB resources not working?
« on: February 11, 2019, 05:37:49 am »
Hey again,

    Firstly I'd like to thank everyone on the server for being so helpful whenever I come with an amateurish problem I don't know how to solve. Really lively community around here and I genuinely appreciate the help. Anyways, moving on.
I've recently been studying up via the Tutorials, and I started using some of the resources provided there, in one instance in particular: In the episode covering the hud, in the description lies a link to some scripts used in Oni-Link Begins, which I promptly downloaded and installed, as an easy solution to a problem that I've spent more than two days on. However, when I ran it, I got one exception from each the key item script, and the key hud script, respectively. From what the error entailed, it looks like the engine doesn't seem to be recognizing any method that includes keys as a non-nil value. I checked the documentation, and I couldn't find any of those methods myself either, which indicates to me that there must be another script which defines those methods. I proceeded to sift through the directory where I got those scripts, looking for any code that mentions "keys", other than the ones I found and installed already.

Here's the exceptions:

1)
Code: [Select]
Error: In on_started: scripts/hud/small_key.lua:19: attempt to call method 'are_small_keys_enabled' (a nil value)2)
Code: [Select]
Error: In on_obtaining: items/consumables/small_key.lua:12: attempt to call method 'add_small_key' (a nil value)
If anyone could help me sort out defining those methods, I'd be much obliged. Thanks much for your time.

alexgleason

  • Full Member
  • ***
  • Posts: 120
  • Vegan on a Desert Island
    • View Profile
    • Vegan on a Desert Island
Re: Methods from OLB resources not working?
« Reply #1 on: February 11, 2019, 08:42:46 pm »
I was able to find these methods by searching the OLB GitLab repo for their names: https://gitlab.com/search?utf8=%E2%9C%93&search=are_small_keys_enabled&group_id=&project_id=6933859&search_code=true&repository_ref=dev

Check out scripts/equipment.lua, looks like it has what you need: https://gitlab.com/solarus-games/zelda-olb-se/blob/dev/data/scripts/equipment.lua
RIP Aaron Swartz

gmanplays@gmail.com

  • Newbie
  • *
  • Posts: 11
    • View Profile
Re: Methods from OLB resources not working?
« Reply #2 on: February 11, 2019, 09:18:10 pm »
Oh jesus, you can search for specific terms on Github? God, I wish I was more observant. Thanks much my guy.

alexgleason

  • Full Member
  • ***
  • Posts: 120
  • Vegan on a Desert Island
    • View Profile
    • Vegan on a Desert Island
Re: Methods from OLB resources not working?
« Reply #3 on: February 11, 2019, 09:26:33 pm »
You're welcome! Glad I could help.  :)
RIP Aaron Swartz