Thread:Extension talk:Scribunto/table index is nil/reply (3)

public function registerInterface( $moduleFileName, $interfaceFuncs, $setupOptions = array ) { $this->interpreter->registerLibrary( 'mw_interface', $interfaceFuncs ); $moduleFileName = $this->normalizeModuleFileName( $moduleFileName ); $package = $this->loadLibraryFromFile( $moduleFileName ); $setupOptions['namespaces'][0]['name']='主要'; var_dump($setupOptions);

now, everything in the namespaces has a name, but the 32th line of mw.site.lua still report error "table index is nil".

and i found that the index 0 (main namespace) is normal to have no name in the array.

the 32th line is  namespacesByName[data.name] = data

i don't kown how to debug in the .lua file, i want to check every data.name.