PDA

View Full Version : Interesting Error When Loading An Extension



dulux-oz
May 24th, 2015, 09:53
Hi Guys,

This one's for the SavWorld Devs (I think): when I load any of my Extensions created for FGv3.1 CoreRPG into SavWorlds I get the following Error:


Script Error: [string "chat:language"]:1: attempt to call field 'renderLanguageTools' (a nil value)


The Extension then (appears) to work fine.

The Extension works in all (most?) CoreRPG Child Rulesets without error - it certainly works in 3.5E, 4E, 5E, PF, d20 Modern, Numenera, C&C, CoC & Fate Core.

I'm running in Test Mode with FG v3.1 (as stated above) and with the latest version of SavWorlds.

So, am I doing something wrong, is this an error in the latest version of SavWorlds, or is there some function in FGv3.1 that SavWorlds doesn't implement?

Just thought you guts would like to know (& I'd like to find out what's happening as well) :)

Cheers

Ikael
May 24th, 2015, 14:34
Depends what your extension code overrides. The error tells that the extension is breaking up Sw rulesets language feature. This should be investigated with more duals but quick question: Are you overriding DesktopManager?

dulux-oz
May 24th, 2015, 15:23
Depends what your extension code overrides. The error tells that the extension is breaking up Sw rulesets language feature. This should be investigated with more duals but quick question: Are you overriding DesktopManager?

Yeap, all of my Extensions touch on the Desktop Manager (its a common function change used in each one) - every function in the desktop Manager has a slight modification to it.

OK, so if I take a look as SW Ruleset's Desktop Manager I should be able to integrate the Extensions' changes with the SW Ruleset changers into my Extensions - is there anywhere else when I should be looking (ie what other areas/files should I be looking at)?

Thanks for your help.

Ikael
May 24th, 2015, 15:38
Yeap, all of my Extensions touch on the Desktop Manager (its a common function change used in each one) - every function in the desktop Manager has a slight modification to it.

OK, so if I take a look as SW Ruleset's Desktop Manager I should be able to integrate the Extensions' changes with the SW Ruleset changers into my Extensions - is there anywhere else when I should be looking (ie what other areas/files should I be looking at)?

Thanks for your help.

Without seeing your codes it's hard to estimate other required changes, but it's good place to start. How do you change DesktopManager? Change existing functions or overall functionality within it? Savage Worlds has several changes in DesktopManager core functions, but basically it does the same thing as in CoreRPG, but wants to keep track of initialized controls more. While doing SW4 I wanted that file to be similar to CoreRPG but there were several background compatibility factors which eventually lead to using own version of the file.

dulux-oz
May 24th, 2015, 16:05
Without seeing your codes it's hard to estimate other required changes, but it's good place to start. How do you change DesktopManager? Change existing functions or overall functionality within it? Savage Worlds has several changes in DesktopManager core functions, but basically it does the same thing as in CoreRPG, but wants to keep track of initialized controls more. While doing SW4 I wanted that file to be similar to CoreRPG but there were several background compatibility factors which eventually lead to using own version of the file.

Now I know where to look I'm pretty sure I can get it figured out, but I might still need to "mental vampire" (such your brain - ask questions) from time to time. :)

FYI there are two changes: the first is the ability to specify where in the Button Stack a new (ie Extension) Button will be placed - this is a relatively minor change.

The second is more complex in that in dynamically calculates the width of the Menubar/Sidebar depending upon the number and type of Buttons.

I've also got a nasty habit of changing (internal) variable names when I re-write a function (eg renamed delayedCreate to aDelayedCreate) - I've been caught a few times before. Still, that's something I'll just have to watch out for.

Cheers

dulux-oz
May 31st, 2015, 12:19
OK, so I've got this sorted (as far as I can tell) - you and I, Ikael, think amazingly alike - it only took 5 lines of code to itergrate your SW Ruleset stuff into my Extenmsions stuff (or is that the other way around :) ).

Oh, BTW, you've got an error on line 196 of your manager_desktop.lua file (I think) - shouldn't it read:


194 function removeDockShortcut(recordName, fromSubdock)
195 local controlTable = fromSubdock and subdockcontrols or dockcontrols
196 removeControlByRecordName(controlTable , recordName)
197 end


Cheers