Skip to main content

Indie game storeFree gamesFun gamesHorror games
Game developmentAssetsComics
SalesBundles
Jobs
TagsGame Engines

I did get an error earlier when I was trying to write: 

Error

engine/projects.lua:91: attempt to concatenate local 'file' (a nil value)

Traceback

[love "callbacks.lua"]:228: in function 'handler'

engine/projects.lua:91: in function 'loadFile'

engine/projects.lua:65: in function 'getFileSummary'

engine/states/fileSelect.lua:65: in function 'draw'

engine/states.lua:56: in function 'draw'

engine/init.lua:54: in function 'draw'

main.lua:42: in function 'draw'

[love "callbacks.lua"]:168: in function <[love "callbacks.lua"]:144>

[C]: in function 'xpcall'

I had spent some time writing earlier today, but when I tried to open my current project, it shows 0 chapters and 0 words. If I select "Open another project", I can see my project, with 1 chapter, and 106 words. But then if I open it to edit, there aren't any words at all. If I try to edit a different chapter, I get that Lua error. 

I just got this today and I've been having so much fun, but if I've already lost a small bit of what I worked on, it's going to be hard to keep working on projects. :[

Even creating a new chapter and then trying to switch to another causes the Lua crash. I'm running on Windows 64, if that helps! 

Did you download it from the itch downloader? If not, did you extract the zip file to a folder, or are you running it from inside the zip archive? Thanks in advance!

Nevermind, it's obviously not in the zip archive still, that would cause a different error.

I'm sorry, I can't seem to recreate this error on my own Windows 11 machine. I did a fresh install, wiped the other projects, and tried different ways to receate the error.

It seems like it's having issues getting the file name (that's the nul). What did you name the chapter, out of curiosity?

Trying to narrow this down somehow. I'm a writer myself, and I know how frustrating it is to lose work.

Thank you, I really appreciate you looking into this! I have one chapter called "Test Chapter", where I was just trying to see if I could switch to other chapters. I also have one called "In Which Lyre Talks". 

I did a few things this morning after you mentioned the zip archive and extraction. When I had first extracted from the Zip, it was in my downloads folder. I tested it, then moved the unzipped folder to my documents. After that, I started having the issue. 

So today I deleted the one that existed in documents, moved the zip to documents, and unzipped it there before using it. And now it seems to be working between sessions with no errors! 

I'm not a lua person but I do program in C# quite a bit, so I'm wondering if it had just associated the directory with my downloads folder since I ran it / saved a project there first, and couldn't find it once I'd moved it. 

Either way, it looks like it's working just fine now! It's not too much of a word loss and I should've saved it in the right spot in the first place. But thank you so much for following up on this one! 

Actually, thank you so much for mentioning this! It's not a Lua thing, but a save file thing. In order to keep track of which themes are for which projects a save file stores the location of each projects and files (it's in Appdata/Roaming). I have a feeling it was probably seeing the original location, saving it, and then having those issues.
I am so glad it's working for you now though. That makes me happy! If there are any other issues, please let me know. I'm going to make it so that in future updates (one coming before the end of this month) it will use relative directory names for the themes and the save file, rather than hard coded. That should keep that from happening again (finger's crossed!), in case anyone else has the same issue.
Thank you for letting me know that's what fixed it for you. I was worried! I was hoping we could find a solution, and glad one came out.

Oh shit, I am so sorry! This is the first time this error has shown up. Let me look into it. What operating system? Windows 11 or Windows 10?

Also, can you look at the projects folder it should have created in the ManaWriter folder, and let me know if their is a folder named after that project, and if there are text files in there, and if so, what do they have inside?

Thank you so much for checking these in advance. I'm going to see what I can do. I might have you email me your folder at some point, if I can't recreate the error.

I think what's happening is that the Chapter might be unnamed, but I thought I'd fixed that by forcing a name, so it should still create the file and access it correctly. I'll take a look today and let you know what I find.