PDA

View Full Version : Desktop Manager Problem



Foen
September 13th, 2008, 08:13
If a ruleset is updated to use the new desktop manager code (from d20 release 12), it will no longer work on v2.1.1 due to a problem with the desktopmanager.lua file. The rulesets *should* work, as the new desktop manager code doesn't seem to use v2.2 engine functionality at all.

I get an "attempt to index global 'table' (a nil value)" error on line 75:



75: table.insert(delayedCreate, createFunc);


I'm not sure why this is, as table.insert is a defined lua script library function. Has there been any change to the Lua interpreter for table manipulation in v2.2 compared to v2.1.1 which might explain this?

Foen

Goblin-King
September 13th, 2008, 12:13
No such change, and the table table should always be there when scripts are evaluated. I think the most likely explanations for the error would be either a variable called 'table' being declared somewhere in the environment in which the call to registerStackShortcut is made, or an earlier script error somewhere that's confusing the entire script engine.

Foen
September 13th, 2008, 14:04
Might it be to do with the embedded local function definition in the preceding few lines? Perhaps your previous Lua interpreter couldn't handle it.

Stuart