Dev link script breaks creation of .rpyc files for linked files
When testing the script, I forgot to purge old .rpyc files from the game dir, so it appeared to work. Testing it with a fresh copy of the game, .rpyc files aren't created, and the game fails to load:
I'm sorry, but an uncaught exception occurred.
While loading the script.
UnboundLocalError: local variable 'lastfn' referenced before assignment
-- Full Traceback ------------------------------------------------------------
Full traceback:
File "C:\Users\rsbox\Code\ptce\MonGirlDreams\renpy\bootstrap.py", line 359, in bootstrap
renpy.main.main()
File "C:\Users\rsbox\Code\ptce\MonGirlDreams\renpy\main.py", line 470, in main
renpy.game.script.load_script() # sets renpy.game.script.
File "C:\Users\rsbox\Code\ptce\MonGirlDreams\renpy\script.py", line 359, in load_script
self.load_appropriate_file(".rpyc", [ "_ren.py", ".rpy" ], dir, fn, initcode)
File "C:\Users\rsbox\Code\ptce\MonGirlDreams\renpy\script.py", line 949, in load_appropriate_file
raise Exception("Could not load file %s." % lastfn) # type: ignore
UnboundLocalError: local variable 'lastfn' referenced before assignment
Windows-10-10.0.26200 AMD64
Ren'Py 8.3.7.25031702
My guess is that, on Windows, hard links are required. The script may need to behave differently depending on the platform.