• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
[Pawn] Problem with percentage
#2
Because -2??-1 is the max value a single variable can store and as soon as you can try to go beyond that value, it overflows and starts going backwards...



Try price * 0.percentage



Ex: 340 000 000 * 0.75
Using Pawn.CMD?

If you're doing so, this is the very first sign that you absolutely shouldn't utilize your all powerful P-Code knowledge in any of the scripting discussion topics.
  Reply


Messages In This Thread
Problem with percentage - by GospodinX - 2020-12-22, 10:32 AM
RE: Problem with percentage - by Pinch - 2020-12-22, 11:36 AM
RE: Problem with percentage - by GospodinX - 2020-12-22, 10:45 PM
RE: Problem with percentage - by Pinch - 2020-12-23, 10:54 AM

Forum Jump: