#Game crashes if LUA_PATH or LUA_CPATH env vars are set

1 messages · Page 1 of 1 (latest)

bright stratus
#

I tried playing on my computer and received the crash shown in the image.

This happens because I'm developing a lua game on my PC, and I need to set the LUA_PATH and LUA_CPATH env vars for some internal tools. Balatro then reads these env vars, and tries to load its own files from the folders specified in these env vars.

Shipped games should not break if you set env vars LUA_PATH and LUA_CPATH. Rather, you can set your own LUA_PATH and LUA_CPATH as global variables inside your code, and lua will use these first before looking for the env vars. You can read more about this in the lua documentation:

https://www.lua.org/pil/8.1.html

I don't know much about the LOVE game engine, but this should be relatively trivial to do.