Lady: making savegames easy

Showcase your libraries, tools and other projects that help your fellow love users.
User avatar
s-ol
Party member
Posts: 1077
Joined: Mon Sep 15, 2014 7:41 pm
Location: Cologne, Germany
Contact:

Re: Lady: making savegames easy

Post by s-ol »

ejmr wrote:setfenv() was removed in Lua 5.2. LÖVE uses LuaJIT, however, which maintains a lot of compatibility with Lua 5.1 and thus still has setfenv(). So my guess is that you are trying to run your code with a verison of Lua that no longer supports setfenv().
If setfenv didn't exist, the error would have to look differently. The only reason I can imagine for that error is that you are passing a wrong "savename".

s-ol.nu /blog  -  p.s-ol.be /st8.lua  -  g.s-ol.be /gtglg /curcur

Code: Select all

print( type(love) )
if false then
  baby:hurt(me)
end
prixt
Prole
Posts: 26
Joined: Sat Sep 12, 2015 5:53 am

Re: Lady: making savegames easy

Post by prixt »

Here are the basic files that caused the problem. Not sure if Lady doesn't support triple-tables within a middleclass class, but work-arounds are rather unintuitive and would be a hassle in the long run.
Attachments
helppls.love
(13.07 KiB) Downloaded 108 times
helppls.zip
(13.07 KiB) Downloaded 108 times
User avatar
Robin
The Omniscient
Posts: 6506
Joined: Fri Feb 20, 2009 4:29 pm
Location: The Netherlands
Contact:

Re: Lady: making savegames easy

Post by Robin »

Ah, I see the problem. You've reached the maximum amount of locals in your save file, and that's possible because I forgot to fix Lady the same way I did Ser. I'm fixing it right now and will edit this post when you can re-download Lady from GitHub.

Edit: okay, this should work.
Help us help you: attach a .love.
prixt
Prole
Posts: 26
Joined: Sat Sep 12, 2015 5:53 am

Re: Lady: making savegames easy

Post by prixt »

Robin wrote:Ah, I see the problem. You've reached the maximum amount of locals in your save file, and that's possible because I forgot to fix Lady the same way I did Ser. I'm fixing it right now and will edit this post when you can re-download Lady from GitHub.

Edit: okay, this should work.
OMG thank you! :ultrahappy:
prixt
Prole
Posts: 26
Joined: Sat Sep 12, 2015 5:53 am

Re: Lady: making savegames easy

Post by prixt »

Hi, sorry to bother you again. Managed to get some progress on the game, but stumbled on another problem.
It seems like Lady is now not able to load the savefile properly, but instead returns nil.
Thank you in advance.
Attachments
Treasury of the Mad King.love
(40.24 KiB) Downloaded 294 times
User avatar
Robin
The Omniscient
Posts: 6506
Joined: Fri Feb 20, 2009 4:29 pm
Location: The Netherlands
Contact:

Re: Lady: making savegames easy

Post by Robin »

I'm sorry, your save file has more than 65536 constants, and Lua can't handle it. There is no way Lady can help you, unless you find a way to make the dungeon much, much smaller in terms of values used. I suggest using [wiki]binser[/wiki], which doesn't store you savegame as Lua. Binser supports middleclass just like Lady does, so the change should be relatively painless.
Help us help you: attach a .love.
User avatar
Jasoco
Inner party member
Posts: 3727
Joined: Mon Jun 22, 2009 9:35 am
Location: Pennsylvania, USA
Contact:

Re: Lady: making savegames easy

Post by Jasoco »

Would be best to try and break the file into multiple parts. And discard any data beforehand that is just empty by setting it to nil.
User avatar
bakpakin
Party member
Posts: 114
Joined: Sun Mar 15, 2015 9:29 am
Location: Boston

Re: Lady: making savegames easy

Post by bakpakin »

As the author of binser, I agree that it should work and save your game. However, it might not be as easy to set up as Lady. If you do decide to use binser, I'll be glad to help.
((_((_CRAYOLA_((_((_> GitHub <_((_((_CRAYOLA_((_(()
prixt
Prole
Posts: 26
Joined: Sat Sep 12, 2015 5:53 am

Re: Lady: making savegames easy

Post by prixt »

Ah, I see. Thank you for the response. I'll see what I can/should do.
Post Reply

Who is online

Users browsing this forum: No registered users and 0 guests