Jump to content


Photo

Variable Math coding


  • Please log in to reply
4 replies to this topic

#1 SNWrestler

SNWrestler

    GMC Member

  • New Member
  • 290 posts

Posted 16 February 2011 - 03:57 AM

Ok, issue is I want GM to do some calculations for me

I have these declared variables
HORL=0
HORR=0
OT=1

I then have culmination variable
HORF

I want HORF to equal the following math problem ((HORL * -1)+HORR)/OT

It has to do with Artillery adjustments, HORL * -1 would do left adjustments. When a value is inputted for HORL or HORR it clears the opposing variable to keep it working right. Any help please?
  • 0

#2 IceMetalPunk

IceMetalPunk

    InfiniteIMPerfection

  • Retired Staff
  • 9259 posts
  • Version:Unknown

Posted 16 February 2011 - 04:12 AM

So where's you're problem? You have it already written correctly.

HORF = ((HORL * -1)+HORR)/OT;

And whenever you change any values, just recalculate the value of HORF.

-IMP ;) :)
  • 0

#3 SNWrestler

SNWrestler

    GMC Member

  • New Member
  • 290 posts

Posted 16 February 2011 - 04:18 AM

Gracias, didnt know I was that close. The red box saying unknown symbol is intimidating
  • 0

#4 SNWrestler

SNWrestler

    GMC Member

  • New Member
  • 290 posts

Posted 16 February 2011 - 04:42 AM

Cant seem to get that to work...
  • 0

#5 pqp239

pqp239

    GMC Member

  • GMC Member
  • 105 posts
  • Version:GM:HTML5

Posted 16 February 2011 - 04:54 AM

I'm not sure if those 3 variables are changing or not. If they're not HORF will always be 0
  • 0




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users