Im not exactly sure how to do it in the way im seeking but I'm trying to have my code take a result and minus a % from that result but I can't figure out how to make it just - the % like blah+blah=4-5% is there a way to just have it be %? or do I have to figure out a equation to do so like 2/100 to get 2% but when i do this it just minuses the 0.02 instead of the actual %
|
take a result and minus a % from that result pretty much directly translates to new_result = result - percent * result |
problem im having is the code is basically
rank+25*level/mod then whatever the result is it would - a % from it before giving the end result var/a = 10 problem is how do i put in the equation in for A and how do I put in the the % var so its A*(var/100) below is what im trying to get it to look like or work like var/a = rank+25*level/mod reduction being w/e the number is for the % |
In response to Mastergamerx
|
|
var/a = rank + 25 * level / mod Why does this not work? Also, please don't use variable names like a,b,c. It's not easy for us to understand what those variables are supposed to be. |
well when i tried it the compiler said that the level/mod was a unassigned var even though it was a var and reduction was same thing
|
Should you need a handy proc:
an example:
thing = 100 - percentage(100,20) // 20% of 100 is 20
The symbol % means modulo, which calculates the remainder of a division equation (such as 100 % 7 = 2, where 7 goes into 100 14 times with 2 remaining)