davelens / fvtt-party-resources

A simple module for FoundryVTT to manage (and track) custom party-wide numeric values.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

This is not a registered game setting

g1eagle opened this issue · comments

foundry.js:135 Uncaught (in promise) Error: This is not a registered game setting
[Detected 1 package: fvtt-party-resources]
at ClientSettings.get (foundry.js:135:182)
at ResourcesApi.get (resources_api.mjs:37:26)
at eval (eval at _executeScript (foundry.js:1145:20), :4:21)
at Macro.eval (eval at _executeScript (foundry.js:1145:20), :5:7)
at Macro._executeScript (foundry.js:1145:80)
at Macro.execute (foundry.js:1141:102)
at MacroConfig._onExecute (foundry.js:4783:108)

Get this error when attempting to use the api.

@g1eagle Typically you get the This is not a registered game setting error when you're trying to save values to non-existent identifiers. Can you give me the exact commands you're using along with the resource ID you're trying to set/get with the API? You can grab the resource ID in the "Edit resource" form:

pr-43

@g1eagle Bump. Have you seen my previous question / did you get this resolved / can I close this? :)

let v = window.pr.api.get('shipfuel')
window.pr.api.set('shipfuel', 50)

Where the commands I was trying to use. They didn't work at first, but once I relaunched the world I guess it saved them down and recognizes the values now. Feel free to close.

@g1eagle Hmm, alright. The "normal" behaviour should be that, once saved, it Just Works™️. But good to hear it got resolved. Closing