PDA

View Full Version : Script error when I was creating my module



Wulfric1
February 13th, 2025, 00:57
Hi! I was creating a module with the D&D5e setting when suddenly I started getting errors.

[2/13/2025 12:35:47 AM] [ERROR] Script execution error: [string "CoreRPG:scripts/manager_desktop.lua"]:468: attempt to index global 'CampaignRegistry' (a nil value)
[2/13/2025 12:35:47 AM] [ERROR] Script execution error: [string "CoreRPG:scripts/manager_gmidentity.lua"]:106: attempt to index global 'CampaignRegistry' (a nil value)
[2/13/2025 12:35:47 AM] [ERROR] Script execution error: [string "CoreRPG:scripts/manager_options.lua"]:324: attempt to index global 'CampaignRegistry' (a nil value)
[2/13/2025 12:35:49 AM] [ERROR] Handler error: [string "CoreRPG:scripts/manager_options.lua"]:324: attempt to index global 'CampaignRegistry' (a nil value)
[2/13/2025 12:36:14 AM] [ERROR] Script execution error: [string "CoreRPG:scripts/manager_options.lua"]:310: attempt to index global 'CampaignRegistry' (a nil value)

What can I do to fix this? I've been working on the module for a while now and I wouldn't want to lose all the work I've done. Thanks to everyone in advance.

Moon Wizard
February 13th, 2025, 01:43
If you look earlier in the log, there is probably an error reported for the CampaignRegistry.lua file being unable to be opened.

It's usually caused by that file being corrupted or the permissions changed on it. To fix, go into the folder for that campaign, and delete the "CampaignRegistry.lua" file. It will rebuild the next time you open and exit the program. (You can find your campaign folder by opening the FG data folder (button on upper left of FG launch screen), then navigating to campaigns, and the name of your campain.)

Also, make sure you are not running any always-on backup software such as OneDrive or Google Drive on the folder where your FG campaigns are stored. Use a once-a-day backup program/schedule instead.

Regards,
JPG