Announcement

Collapse
No announcement yet.

Dividing variables

Collapse
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • Dividing variables

    How do i divide variables in RR? / sign is taken, so what symbol do you use? I am making a fuel log (just a table)

    date litres p per litre milage cost mpg

    variables are called

    datef namef pencef lastf nextf interf

    Date, litres, p per litre, milage are filled in with the numosk, cost is worked out by multiplying litres by p per litre - this works fine

    Code:
    B,549,115,105,28,"BYVAR;VMPAGE;EVAL;VMNEXTF01;$VMNAMEF01$*$VMPENCEF01$<<EVAL;VMNEXTF01B;$VMNAMEF01B$*$VMPENCEF01B$",
    I want to get mpg by dividing milage by litres and then dividing this by 4.5. If it was a / sign for divide it would be this (unless i made a mistake).

    Code:
    B,655,115,74,28,"BYVAR;VMPAGE;EVAL;VMINTERF01;$VMLASTF01$/$VMNAMEF01$/$4.5$<<EVAL;VMINTERF01B;$VMLASTF01B$/$VMPENCEF01B$/$4.5$",
    Please help if you can.

    Thank you
    Skins:
    /showthread.php?t=83814 (R.I.P.)
    /104373-golf-skin.html (R.I.P.)
    /106214-metal-spin-release.html(RIP)
    using own vw gypsy clone
    On 2nd PC: 1st one died.

  • #2
    To make this much easier, Y don't you just use the Milage trip plugin??

    This is what it does, and keeps a log, like the one your trying to do *re-inventing the wheel??

    See here, I use it and it works great.

    http://www.mp3car.com/vbulletin/rr-p...nsumption.html
    RideRunner...The #1 FE, PERIOD.

    Current Project: DFXVoice [v1.0 Released]
    Next in line: RRMedia v2.0

    DFX 5.1.1 Skin
    Appstore Link

    My RideRunner Plugins
    RRMedia
    RRExtended
    DFXVoice

    "There are no bugs - only undocumented features."

    Comment


    • #3
      I know about that but cant test it it needs gps. I thought it would be simple to do it my way, I just need the divide symbol. Plus ive made the skin and it took ages.
      Skins:
      /showthread.php?t=83814 (R.I.P.)
      /104373-golf-skin.html (R.I.P.)
      /106214-metal-spin-release.html(RIP)
      using own vw gypsy clone
      On 2nd PC: 1st one died.

      Comment


      • #4
        I guess no one know... or will tell me. Still hoping someone can help
        Skins:
        /showthread.php?t=83814 (R.I.P.)
        /104373-golf-skin.html (R.I.P.)
        /106214-metal-spin-release.html(RIP)
        using own vw gypsy clone
        On 2nd PC: 1st one died.

        Comment


        • #5
          Why can't you use "/" ? I did and it works fine.

          Here's a line I use it in:
          Code:
          "EVALWINAMPVOL","EVAL;evalwinampvolvar;$TEMPigwinampvol$*255/100||SETVAR;evalwinampvolvar;$evalwinampvolvar$||SAVETOSKIN;evalwinampvolvar;$evalwinampvolvar$"
          Pico-ITX / XP Home with EWF-HORM / RR v12/02/2009 / Winamp v5.13 / RRMedia v1.2.2

          Comment


          • #6
            For some reason it didnt work. Ill try again though.
            Skins:
            /showthread.php?t=83814 (R.I.P.)
            /104373-golf-skin.html (R.I.P.)
            /106214-metal-spin-release.html(RIP)
            using own vw gypsy clone
            On 2nd PC: 1st one died.

            Comment


            • #7
              Ok found the problem... It now works. Thought the problem was because it couldnt use / as divide but it was something else entirely - some variables were named and labeled wrong and my maths was dodgy. LOL. Thanks for making me check again. If anyone wants the code, what it does and what i did with it just ask.
              Skins:
              /showthread.php?t=83814 (R.I.P.)
              /104373-golf-skin.html (R.I.P.)
              /106214-metal-spin-release.html(RIP)
              using own vw gypsy clone
              On 2nd PC: 1st one died.

              Comment


              • #8
                Ok another question - is it possible to limit numbers to 2 dp only? I only need 2 decimal places in my output numbers, any more is pointless.

                One gives a cash value for cost, (so obviously more than 2dp gives 10ths of pence - useless)
                T
                he other gives MPG which only needs 1dp really (it isnt accurate enough to use any more) plus who cares about being something like 0.05 of a MPG out.

                Please help if you can.

                Thanks.
                Skins:
                /showthread.php?t=83814 (R.I.P.)
                /104373-golf-skin.html (R.I.P.)
                /106214-metal-spin-release.html(RIP)
                using own vw gypsy clone
                On 2nd PC: 1st one died.

                Comment

                Working...
                X