I'm having a problem with the order in which a simple expression is being
evaluated in conjunction with a shorthand assignment operator.
The relevant lines are:
(GET_RV(victim, DAM_GEN_INERTIA) = 50;
dam = 230;
dam *= (GET_RV(victim, DAM_GEN_INERTIA) / 100);
After this line executes, dam = 0. In actuality, it should equal 115, since
(by my understanding of the order of evaluation) 50 divided by 100 equals
1/2. 230 multiplied by 1/2 equals 115. Yes?
Since the macro GET_RV(victim, DAM_GEN_INTERTIA) positively works and always
returns the value of 50 in other functions, how can dam be reduced to 0?
Any ideas or insight is most appreciated.
--Rob.
----------------
ICQ: 14598527
+------------------------------------------------------------+
| Ensure that you have read the CircleMUD Mailing List FAQ: |
| http://qsilver.queensu.ca/~fletchra/Circle/list-faq.html |
+------------------------------------------------------------+
This archive was generated by hypermail 2b30 : 04/10/01 PDT