Any one know how to overcome this problem, or are yas all stumped?
On 1/04/2015 10:46 PM, Brenton Horne wrote:
Well actually after I sent my reply I did this hoping it might overcome this problem, it gave Nada, I'm afraid it still felt I was using a nil value.
On 1/04/2015 10:44 PM, Ricordisamoa wrote:
Il 01/04/2015 11:52, Brenton Horne ha scritto:
I have this template within my Chembox {{Molar mass calculator| |Ag ={{{Ag|}}} |As ={{{As|}}} |Au ={{{Au|}}} |B ={{{B|}}} |Ba ={{{Ba|}}} |Bi ={{{Bi|}}} |Br ={{{Br|}}} |C ={{{C|}}} |Ca ={{{Ca|}}} |Cl ={{{Cl|}}} |Co ={{{Co|}}} |Cu ={{{Cu|}}} |F ={{{F|}}} |Fe ={{{Fe|}}} |H ={{{H|}}} |I ={{{I|}}} |K ={{{K|}}} |Li ={{{Li|}}} |N ={{{N|}}} |Na ={{{Na|}}} |Ni ={{{Ni|}}} |O ={{{O|}}} |P ={{{P|}}} |Pt ={{{Pt|}}} |S ={{{S|}}} |Se ={{{Se|}}} |Sr ={{{Sr|}}} |Zn ={{{Zn|}}} }} as each of these element parameters are optional they can be null and even when some parameters are provided I get the script error:
Lua error in Module:Molar_mass_calculator at line 8: attempt to perform arithmetic on a nil value.
Backtrace:
- *(tail call)*: ?
- *Module:Molar_mass_calculator:8
http://localhost/mediawiki/index.php?title=Module:Molar_mass_calculator&action=edit#mw-ce-l8*:
in function "chunk" 3. *mw.lua:497*: ? 4. *(tail call)*: ? 5. *[C]*: in function "xpcall" 6. *MWServer.lua:87*: in function "handleCall" 7. *MWServer.lua:301*: in function "dispatch" 8. *MWServer.lua:58*: ? 9. *(tail call)*: ? 10. *mw.lua:141*: ? 11. *Module:Infobox:320 http://localhost/mediawiki/index.php?title=Module:Infobox&action=edit#mw-ce-l320*:
in function "preprocessArgs" 12. *Module:Infobox:373 http://localhost/mediawiki/index.php?title=Module:Infobox&action=edit#mw-ce-l373*:
in function "chunk" 13. *mw.lua:497*: ? 14. *(tail call)*: ? 15. *[C]*: in function "xpcall" 16. *MWServer.lua:87*: in function "handleCall" 17. *MWServer.lua:301*: in function "dispatch" 18. *MWServer.lua:40*: in function "execute" 19. *mw_main.lua:7*: in main chunk 20. *[C]*: ?
any ideas of how to overcome this error?
Have you tried putting "{{#invoke:Molar mass calculator | calc}}" in your Chembox instead of the template?
Wikitech-l mailing list Wikitech-l@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/wikitech-l