PDA

View Full Version : script error with custom skin



tahl_liadon
February 2nd, 2020, 21:39
.
hi.

i am getting this error message:

Script Error: [string ""]:1: attempt to set a value for an invalid handler 'onLockChanged'

no idea what it is -- is it something i can fix? thx

Moon Wizard
February 2nd, 2020, 22:28
There is somewhere in the script for your custom skin where a script is defining something like "onLockChanged = ...". Since onLockChanged is not a handler-type event, it can't be assigned that way. onLockChanged is just a custom function that is called by the button_record_locked template from CoreRPG.

Also, most themes should not need to trigger any changes on the lock changing, so not sure why it's even needed for a custom skin.

Ultimately, you will have to reach out to the person who made the skin to fix the error.

Regards,
JPG

tahl_liadon
February 2nd, 2020, 23:45
.
haha thx for the response -- i have no idea what you said in your explanation {:-(

i made the skin myself, and all i did was changed graphics and fonts (see here (https://www.fantasygrounds.com/forums/showthread.php?52730-pathfinder-ruins-of-azlant-fg-interface-and-mod)), which i updated the graphics_fonts.xml file. that's it. i don't know enough and did not touch any script.

it was actually working for a long while, then only recently that error message propped up. i'm thinking maybe something eventually conflicted with fg updates? i dunno know.

Mortar
February 3rd, 2020, 22:42
Run a search on all the files in your extension for "onLockChanged" and see what turns up.

tahl_liadon
February 5th, 2020, 01:05
.
all right, @mortal... thx. will try to find that pin in the haystack lol

tahl_liadon
February 5th, 2020, 01:21
.
ok, i'm back. wasn't as hard to find as i imagined.

the result came back with stuff that's pretty cryptic for me... could someone check out the screengrab attached and shed some light? thx

31461

Moon Wizard
February 5th, 2020, 01:26
Unless you have customized the CoreRPG/3.5E rulesets; you should not have unpacked folders in your rulesets directory. Those will actually override the default updated rulesets, which will eventually cause issues.

The first thing I would do is to delete or move the subfolders (CoreRPG/3.5E) within the FG data rulesets folder. If you haven't made any modifications, you can just delete the ruleset folder; then the CoreRPG.pak and 3.5E.pak files updated by the updater will take over.

Once you do that, you can see if you still get the error.

If you do, please upload the extension (.ext) to your next post.

Regards,
JPG

tahl_liadon
February 5th, 2020, 14:03
.
thx @moon -- that actually made sense, and pointed me to where i need to go.

(yea, i do have the stuff unpacked and in same directory, as you described, so i can edit the graphics. i think what you're saying is, ultimately the final step is to repack and remove the unpacked stuff from directory; then the problem might go away once i let fg update).

LordEntrails
February 5th, 2020, 16:06
Turn your changes into an extension with a different name. Otherwise your unpacked ruleset will never get updates and if you repack to the same name it will get lost when you upate.

tahl_liadon
February 6th, 2020, 03:00
.
thx, everyone, for the guidance and tips.

worked as expected and no more script error message.

tahl_liadon
February 9th, 2020, 02:09
.
another question not relating to script error:

i just noticed the decal (desktopdecal_sw.png is in the directory where it should be) went mia, not displaying anymore. what might have caused this?

again, i haven't touched any codes except making font substitution changes in graphics_fonts.xml.

Moon Wizard
February 9th, 2020, 07:46
Make sure you are building as an extension using the decal extension example as a starting point. If you are editing the ruleset directly like you were before, you'll have more issues in the long run.

JPG

tahl_liadon
February 9th, 2020, 16:23
.
haha! it turned out the 'desktop: decal image" option was toggled off by accident... decal is displaying now.

...but, thx for pointing me to that decal extension -- looks really cool and useful (love fg fan-created stuff, so awesome).