(Go: >> BACK << -|- >> HOME <<)

Jump to content

Module talk:Data

Page contents not supported in other languages.
From Wikipedia, the free encyclopedia

This is an old revision of this page, as edited by Jackmcbarn (talk | contribs) at 19:04, 16 January 2021 (re). The present address (URL) is a permanent link to this revision, which may differ significantly from the current revision.

Request

@Jackmcbarn: I know you're not too active at the moment, but I have a request. Would it be possible to update the code so that it will fail gracefully (without script errors) if key1 does not exist in the data module? At the moment I have no way to see if a value is defined without causing the script error. Thanks and hope to see you back soon! — Martin (MSGJ · talk) 22:24, 14 January 2021 (UTC)[reply]

@MSGJ: Done. Add |softfail= to the invocation you want this for. Jackmcbarn (talk) 00:35, 15 January 2021 (UTC)[reply]
Sorry it's not working yet. — Martin (MSGJ · talk) 10:14, 15 January 2021 (UTC)[reply]

{{#invoke:Data|Module:Data/Bridge config|Q1234|c1|softfail=y}} -> Lua error in package.lua at line 80: module 'Module:Data/Bridge config' not found.

@MSGJ: I see. It's because table.concat doesn't respect metamethods. Fixed now. Jackmcbarn (talk) 19:04, 16 January 2021 (UTC)[reply]