PDA

View Full Version : 'CampaignRegistry' (a nil value)-4E Ruleset



CoinReturn
May 20th, 2009, 00:09
"Script Error: [string "scripts/*anything I touch*.lua"]:*##*: attempt to index global 'CampaignRegistry' (a nil value)"

I keep receiving errors like the one above while trying to play in a 4E game. Every time I click something in my character sheet I get the error and can't make any rolls from the character sheet. I have tried reinstalling Fantasy Grounds several time to no avail.

I am running Vista 64-bit and have the newest updates to Fantasy Grounds. I've tried searching the forums for a similar problem but haven't turned up any results. If anyone could point me in the right direction I would really appreciate it.

Moon Wizard
May 20th, 2009, 03:02
I don't remember seeing this error until recently. It may be something that was changed in a recent version of FG, or for some reason not visible until now.

This error usually occurs in local mode for any ruleset derived from d20 (including 4E_JPG). In basic terms, you are not in a campaign, so the campaign registry does not exist. The campaign registry is used to store window positions, which means it will throw errors all the time.

The workaround is to add a few lines of code to disable the window position code in local mode. Or, have your GM run the host, so you can connect and create characters directly.

In windowmanager.lua, update these functions:



function onWindowOpened(window)
if CampaignRegistry then
...
end
end

function onWindowClosed(window)
if CampaignRegistry then
...
end
end


I'm including this update in the 1.5.1 revision of the 4E_JPG ruleset, which will be coming soon.

Cheers,
JPG