About: RuneScape:User help/Archive 2   Sponge Permalink

An Entity of Type : dbkwik:resource/o7EcIXHwNuzYbUbbCdDWcQ==, within Data Space : 134.155.108.49:8890 associated with source dataset(s)

I have this: {{#expr:{{GEP|Plain pizza}}-({{GEP|Cheese}}+{{GEP|Pizza base}}+{{GEP|Tomato}})/143 round 0}} It is supposed to get the price of a plain pizza () minus the prices of Cheese (), Pizza base () and tomato () together, then divide that by 143 and remove all the digits after the decimal point. So can anyone see anything wrong with that code? Cause it returns which is obviously incorrect. User:-Matt/sig 11:43, September 9, 2010 (UTC) I forgot to say that just adding/minusing without dividing gives . Is this better? You forgot two parenthesis. {{#expr:({{GEP|Plain pizza}}-({{GEP|Cheese}}+{{GEP|Pizza base}}+{{GEP|Tomato}}))/143 round 0}} 222 talk 11:47, September 9, 2010 (UTC) Are parenthesis these () ? Why would I need 2? User:-Matt/sig 11:49, September 9, 2010

AttributesValues
rdf:type
rdfs:label
  • RuneScape:User help/Archive 2
rdfs:comment
  • I have this: {{#expr:{{GEP|Plain pizza}}-({{GEP|Cheese}}+{{GEP|Pizza base}}+{{GEP|Tomato}})/143 round 0}} It is supposed to get the price of a plain pizza () minus the prices of Cheese (), Pizza base () and tomato () together, then divide that by 143 and remove all the digits after the decimal point. So can anyone see anything wrong with that code? Cause it returns which is obviously incorrect. User:-Matt/sig 11:43, September 9, 2010 (UTC) I forgot to say that just adding/minusing without dividing gives . Is this better? You forgot two parenthesis. {{#expr:({{GEP|Plain pizza}}-({{GEP|Cheese}}+{{GEP|Pizza base}}+{{GEP|Tomato}}))/143 round 0}} 222 talk 11:47, September 9, 2010 (UTC) Are parenthesis these () ? Why would I need 2? User:-Matt/sig 11:49, September 9, 2010
dbkwik:rune-scape/...iPageUsesTemplate
dbkwik:runescape/p...iPageUsesTemplate
abstract
  • I have this: {{#expr:{{GEP|Plain pizza}}-({{GEP|Cheese}}+{{GEP|Pizza base}}+{{GEP|Tomato}})/143 round 0}} It is supposed to get the price of a plain pizza () minus the prices of Cheese (), Pizza base () and tomato () together, then divide that by 143 and remove all the digits after the decimal point. So can anyone see anything wrong with that code? Cause it returns which is obviously incorrect. User:-Matt/sig 11:43, September 9, 2010 (UTC) I forgot to say that just adding/minusing without dividing gives . Is this better? You forgot two parenthesis. {{#expr:({{GEP|Plain pizza}}-({{GEP|Cheese}}+{{GEP|Pizza base}}+{{GEP|Tomato}}))/143 round 0}} 222 talk 11:47, September 9, 2010 (UTC) Are parenthesis these () ? Why would I need 2? User:-Matt/sig 11:49, September 9, 2010 (UTC) Edit conflict They were missing here (bolded): {{#expr:({{GEP|Plain pizza}}-({{GEP|Cheese}}+{{GEP|Pizza base}}+{{GEP|Tomato}}))/143 round 0}} 222 talk 11:54, September 9, 2010 (UTC) You need them because otherwise the arithmetic would work like this: Cheese+Pizza base+Tomato divided by 143 and then the plain pizza algorithm would be worked out last. i.e. 1. * Cheese+Pizza base+Tomato 2. * "The above" divided by 143 3. * Then finally Plain pizza - "the above" 222 talk 11:54, September 9, 2010 (UTC) Okay, thanks for getting that working. Now I can get back to writing my first GEMW calculator... File:Big smile.gif User:-Matt/sig 11:59, September 9, 2010 (UTC) (edit conflict)So what's wrong with this? {{#expr:{{GEP|Plain pizza}}-({{GEP|Cheese}}+{{GEP|Pizza base}}+{{GEP|Tomato}})}} {{Coins|Amount={{#expr:{{GEP|Meat pizza}}-({{GEP|Cheese}}+{{GEP|Pizza base}}+{{GEP|Tomato}}+{{GEP|Cooked beef}})}}}} User:-Matt/sig 12:28, September 9, 2010 (UTC) Wut? What's happening to it? 222 talk 12:25, September 9, 2010 (UTC) Which gives {{Coins|Amount={{#expr:{{GEP|Meat pizza}}-({{GEP|Cheese}}+{{GEP|Pizza base}}+{{GEP|Tomato}}+{{GEP|Cooked beef}})}}}} User:-Matt/sig 12:28, September 9, 2010 (UTC) Sorry I had the wrong code. User:-Matt/sig 12:28, September 9, 2010 (UTC) I'm not sure why, but it appears {{GEP|Cooked beef}} is causing the expression error. 222 talk 12:33, September 9, 2010 (UTC) Oh, I realised. It's Cooked meat, not cooked beef you genius! See: 222 talk 12:36, September 9, 2010 (UTC) *facepalm* User:-Matt/sig 12:46, September 9, 2010 (UTC) Nubcake... 222 talk 06:31, September 10, 2010 (UTC) If the price of the item is over 1000, you MUST do {{GEP|item|n}}. If you don't add the n, it will display the price with a comma, which will not work in expr parsers. Psycho Robot talkFile:Silver bar.png 03:10, September 11, 2010 (UTC) Now who's the nubcake, looking at , there is no unnamed parameter 2, and that "|n" does nothing!!! Nothing!!! File:Full slayer helmet.png Evil1888 Talk A's L File:Dragon platebody.png 03:25, September 11, 2010 (UTC) Lol, fail. 222 talk 05:11, September 11, 2010 (UTC)
Alternative Linked Data Views: ODE     Raw Data in: CXML | CSV | RDF ( N-Triples N3/Turtle JSON XML ) | OData ( Atom JSON ) | Microdata ( JSON HTML) | JSON-LD    About   
This material is Open Knowledge   W3C Semantic Web Technology [RDF Data] Valid XHTML + RDFa
OpenLink Virtuoso version 07.20.3217, on Linux (x86_64-pc-linux-gnu), Standard Edition
Data on this page belongs to its respective rights holders.
Virtuoso Faceted Browser Copyright © 2009-2012 OpenLink Software