Difference between revisions of "Talk:Moon/Row"

From Kerbal Space Program Wiki
Jump to: navigation, search
(Expression error: Unrecognized punctuation character "{".)
(Expression error: Unrecognized punctuation character "{".)
Line 4: Line 4:
 
:Where does the error occur? Looking at your [http://wiki.kerbalspaceprogram.com/w/index.php?title=Template:Sigfigs&curid=994&diff=58555&oldid=25931&rcid=72485 fix] I doubt that it works. — [[User:XZise|xZise]] <small>&#91;[[User talk:XZise|talk]]&#93;</small> 12:52, 14 March 2015 (CDT)
 
:Where does the error occur? Looking at your [http://wiki.kerbalspaceprogram.com/w/index.php?title=Template:Sigfigs&curid=994&diff=58555&oldid=25931&rcid=72485 fix] I doubt that it works. — [[User:XZise|xZise]] <small>&#91;[[User talk:XZise|talk]]&#93;</small> 12:52, 14 March 2015 (CDT)
 
::Revert the fix and it will appear here, and also when all the <nowiki><noinclue> & <includeonly></nowiki> tags are removed from the Sigfig template. The numbers parsed through Sigfig seem to all work ''with'' my attempted fix, so... what do you think? --[[User:Brendan|Brendan]] ([[User talk:Brendan|talk]]) 12:55, 14 March 2015 (CDT)
 
::Revert the fix and it will appear here, and also when all the <nowiki><noinclue> & <includeonly></nowiki> tags are removed from the Sigfig template. The numbers parsed through Sigfig seem to all work ''with'' my attempted fix, so... what do you think? --[[User:Brendan|Brendan]] ([[User talk:Brendan|talk]]) 12:55, 14 March 2015 (CDT)
 +
:::You made it to triple brackets which interpret it as a variable: {{{#ifexpr: 42 = 0|Oh|No}}} vs. {{#ifexpr: 42 = 0|Oh|No}} (<nowiki>{{{#ifexpr: 42 = 0|Oh|No}}}</nowiki> vs. <nowiki>{{#ifexpr: 42 = 0|Oh|No}}</nowiki>). It returns “Oh” in the first case because the variable “#ifexpr: 42 = 0” is not set (although that name doesn't make sense with the equal sign in it). And if a variable is not set it uses the first parameter after it (“Oh”, interestingly it doesn't use everything after the pipe). This here is also a meta template. The data is missing here so it can't show anything useful. If a variable is not set and also no default (e.g. <nowiki>{{{foobar}}}</nowiki>) then it'll display the text unchanged (so <nowiki>{{{foobar}}}</nowiki>) and the curly brackets are not a valid number.
 +
:::You've now changed it into a variable which seems to have disabled calculating with it and thus no apparent errors. But when I substitute <nowiki>{{sigfigs|1|4}}</nowiki> you see that it's using the scientific notation even though the number is shorter than the given significant figures: {{#ifeq: 1|N/A|N/A|<span style="white-space:nowrap;">{{#formatnum:{{#expr: 1/10^floor(ln(1)/ln(10)) round 4 - 1}}|{{#expr: 4 - 1}}|{{DS}}|t}}×10<sup>{{#formatnum:{{#expr: floor(ln(1)/ln(10))}}|{{DS}}|t}}</sup></span>}} — [[User:XZise|xZise]] <small>&#91;[[User talk:XZise|talk]]&#93;</small> 06:15, 16 March 2015 (CDT)

Revision as of 11:15, 16 March 2015

Expression error: Unrecognized punctuation character "{".

This occurs at the Sigfigs template. Oddly, erasing one "{" in front of it makes the error quiet down, but near as I can tell that would be one too few "{"s to match the "}"s. So, I think the error may be in how Template:Sigfigs returns things. This is a little technical for me... --Brendan (talk) 23:31, 13 March 2015 (CDT)

Where does the error occur? Looking at your fix I doubt that it works. — xZise [talk] 12:52, 14 March 2015 (CDT)
Revert the fix and it will appear here, and also when all the <noinclue> & <includeonly> tags are removed from the Sigfig template. The numbers parsed through Sigfig seem to all work with my attempted fix, so... what do you think? --Brendan (talk) 12:55, 14 March 2015 (CDT)
You made it to triple brackets which interpret it as a variable: Oh vs. No ({{{#ifexpr: 42 = 0|Oh|No}}} vs. {{#ifexpr: 42 = 0|Oh|No}}). It returns “Oh” in the first case because the variable “#ifexpr: 42 = 0” is not set (although that name doesn't make sense with the equal sign in it). And if a variable is not set it uses the first parameter after it (“Oh”, interestingly it doesn't use everything after the pipe). This here is also a meta template. The data is missing here so it can't show anything useful. If a variable is not set and also no default (e.g. {{{foobar}}}) then it'll display the text unchanged (so {{{foobar}}}) and the curly brackets are not a valid number.
You've now changed it into a variable which seems to have disabled calculating with it and thus no apparent errors. But when I substitute {{sigfigs|1|4}} you see that it's using the scientific notation even though the number is shorter than the given significant figures: 1.000×100xZise [talk] 06:15, 16 March 2015 (CDT)