  Apprentice

Joined: 24 Jul 2005
Posts: 137 Posted: Sun Jul 27, 2014 11:22 am
I'm currently trying to make a piece of complex code for working out the exact condition of my equipment.

Basically, I need to work out the formula to find "A" and my brain is frozen right now!

 Code: 40 = (((((800-A)*267)*100)/800)/85)+1

Any help would be greatly appreciated.[/quote] Wanderer

Joined: 13 Aug 2011
Posts: 74 Posted: Sun Jul 27, 2014 3:41 pm Joined: 29 Jan 2003
Posts: 221
Location: islands.genesismuds.org Posted: Sun Jul 27, 2014 3:55 pm

This is pretty basic algebra. You basically undo the equation on both sides of the equals sign until you end up with "A=????" (or "????=A")

Also, I'm guessing that many of the values in the equation can change. So, they should be variables as well. I'm going to not finish out the math, so that you can see where to substitute variables for the constants in the final equation if you need to.

 Code: 40 = (((((800-A)*267)*100)/800)/85)+1 40 - 1 = (((((800-A)*267)*100)/800)/85)+1 - 1 40 - 1 = (((((800-A)*267)*100)/800)/85)  40 - 1       = (((((800-A)*267)*100)/800)/85) * 85 (40 - 1) * 85 =  ((((800-A)*267)*100)/800) ((40 - 1) * 85) * 800 = ((((800-A)*267)*100)/800) * 800 ((40 - 1) * 85) * 800 =  (((800-A)*267)*100) (((40 - 1) * 85) * 800) / 100 = (((800-A)*267)*100) / 100 (((40 - 1) * 85) * 800) / 100 =  ((800-A)*267) ((((40 - 1) * 85) * 800) / 100) / 267 = ((800-A)*267) / 267 ((((40 - 1) * 85) * 800) / 100) / 267 =  (800-A) (((((40 - 1) * 85) * 800) / 100) / 267) + A = (800-A) + A (((((40 - 1) * 85) * 800) / 100) / 267) + A =  800 A + (((((40 - 1) * 85) * 800) / 100) / 267) =  800 A + (((((40-1)*85)*800)/100)/267) - (((((40-1)*85)*800)/100)/267)  =  800 - (((((40-1)*85)*800)/100)/267) A  =  800 - (((((40-1)*85)*800)/100)/267) Apprentice

Joined: 24 Jul 2005
Posts: 137 Posted: Sun Jul 27, 2014 5:00 pm Awesome Hogarius, it works. Yeah my head was just fried after hours of staring into multi-layer strings. Thanks a lot. Display posts from previous: All Posts1 Day7 Days2 Weeks1 Month3 Months6 Months1 Year Oldest FirstNewest First
 All times are GMT Page 1 of 1

 Jump to: Select a forum General Forums----------------Announcements CMUD and TeSSH Support----------------CMUD General DiscussionCMUD Beta ForumTeSSH DiscussionMXP Developers zMUD Support----------------zMUD General DiscussionFinished MUD Scripts Other Forums----------------Website or Forum problemsKnowledge Base Weblogs----------------Zugg's Blog Older, unsupported Products----------------General zApp DiscussionSlightlyMorbidzApp DeveloperszMapper DiscussionzExplorer Discussion
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum

© 2009 Zugg Software. Hosted by Wolfpaw.net